From c13e4fea7d21edaeb8ec9a9f17f9a35ce359cad5 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 2 Nov 2024 22:17:07 +0900 Subject: [PATCH] internal/graphicsdriver/playstation5: update --- .../playstation5/shader_paystation5.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/internal/graphicsdriver/playstation5/shader_paystation5.go b/internal/graphicsdriver/playstation5/shader_paystation5.go index a633553c459d..68dc42d13e2c 100644 --- a/internal/graphicsdriver/playstation5/shader_paystation5.go +++ b/internal/graphicsdriver/playstation5/shader_paystation5.go @@ -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 -}