From 7d3007a43e74974755f2f9b452a9146223aae94b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 7 Dec 2024 23:15:13 +0900 Subject: [PATCH] internal/graphicsdriver/metal: bug fix: compilation failure --- internal/graphicscommand/commandqueue.go | 2 +- internal/graphicsdriver/metal/graphics_darwin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/graphicscommand/commandqueue.go b/internal/graphicscommand/commandqueue.go index caaa31707..97075345c 100644 --- a/internal/graphicscommand/commandqueue.go +++ b/internal/graphicscommand/commandqueue.go @@ -468,7 +468,7 @@ func prependPreservedUniforms(uniforms []uint32, shader *Shader, dst *Image, src return uniforms } -// Confirm the concrete value of graphics.PreservedUniformUint32Count. +// Confirm the concrete value of graphics.PreservedUniformDwordCount. var _ [0]struct{} = [graphics.PreservedUniformDwordCount - 46]struct{}{} type commandQueuePool struct { diff --git a/internal/graphicsdriver/metal/graphics_darwin.go b/internal/graphicsdriver/metal/graphics_darwin.go index 0b0e57c5c..91e9b1472 100644 --- a/internal/graphicsdriver/metal/graphics_darwin.go +++ b/internal/graphicsdriver/metal/graphics_darwin.go @@ -882,7 +882,7 @@ func adjustUniformVariablesLayout(uniformTypes []shaderir.Type, uniforms []uint3 var idx int for i, typ := range uniformTypes { - n := typ.Uint32Count() + n := typ.DwordCount() switch typ.Main { case shaderir.Float, shaderir.Int: values = append(values, uniforms[idx:idx+n]...)