diff --git a/internal/graphicsdriver/directx/graphics12_windows.go b/internal/graphicsdriver/directx/graphics12_windows.go index 114119b2b..c814ee9c8 100644 --- a/internal/graphicsdriver/directx/graphics12_windows.go +++ b/internal/graphicsdriver/directx/graphics12_windows.go @@ -1133,7 +1133,7 @@ func (g *graphics12) DrawTriangles(dstID graphicsdriver.ImageID, srcs [graphics. } shader := g.shaders[shaderID] - adjustedUniforms := shader.adjustUniforms(uniforms, shader) + adjustedUniforms := shader.adjustUniforms(uniforms) w, h := dst.internalSize() g.needFlushDrawCommandList = true diff --git a/internal/graphicsdriver/directx/shader_windows.go b/internal/graphicsdriver/directx/shader_windows.go index 6b0486468..2a18c8427 100644 --- a/internal/graphicsdriver/directx/shader_windows.go +++ b/internal/graphicsdriver/directx/shader_windows.go @@ -157,10 +157,10 @@ func (s *Shader) pipelineState(blend graphicsdriver.Blend, stencilMode stencilMo return state, nil } -func (s *Shader) adjustUniforms(uniforms []uint32, shader *Shader) []uint32 { +func (s *Shader) adjustUniforms(uniforms []uint32) []uint32 { var fs []uint32 var idx int - for i, typ := range shader.uniformTypes { + for i, typ := range s.uniformTypes { if len(fs) < s.uniformOffsets[i]/4 { fs = append(fs, make([]uint32, s.uniformOffsets[i]/4-len(fs))...) }