Skip to content

Commit

Permalink
internal/graphicsdriver/playstation5: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Nov 2, 2024
1 parent 48daae0 commit c13e4fe
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions internal/graphicsdriver/playstation5/shader_paystation5.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,14 @@ import (
)

var (
// precompiledShaders is initialized by an automatically generated Go file.
precompiledShaders []*shader
// precompiledShaders is a map to store precompiled shaders.
// precompiledShaders is initialized by a separate tool.
precompiledShaders map[shaderir.SourceHash]*shaderSource
)

type shader struct {
hash shaderir.SourceHash
type shaderSource struct {
vertexHeader []byte
vertexText []byte
pixelHeader []byte
pixelText []byte
}

func findShaderIndex(hash shaderir.SourceHash) (int, bool) {
for i, s := range precompiledShaders {
if s.hash == hash {
return i, true
}
}
return 0, false
}

0 comments on commit c13e4fe

Please sign in to comment.