mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 19:22:49 +01:00
internal/graphicsdriver/playstation5: update
This commit is contained in:
parent
48daae08ef
commit
c13e4fea7d
@ -21,23 +21,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// precompiledShaders is initialized by an automatically generated Go file.
|
// precompiledShaders is a map to store precompiled shaders.
|
||||||
precompiledShaders []*shader
|
// precompiledShaders is initialized by a separate tool.
|
||||||
|
precompiledShaders map[shaderir.SourceHash]*shaderSource
|
||||||
)
|
)
|
||||||
|
|
||||||
type shader struct {
|
type shaderSource struct {
|
||||||
hash shaderir.SourceHash
|
|
||||||
vertexHeader []byte
|
vertexHeader []byte
|
||||||
vertexText []byte
|
vertexText []byte
|
||||||
pixelHeader []byte
|
pixelHeader []byte
|
||||||
pixelText []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
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user