Compare commits

..

1 Commits

Author SHA1 Message Date
Bertrand Jung
59fd2cc683
Merge b8cf4ea82f into ffb77757f0 2024-06-12 23:20:47 +03:00
2 changed files with 7 additions and 3 deletions

View File

@ -16,7 +16,6 @@ package graphics
const (
ShaderSrcImageCount = 4
// ShaderDstImageCount is the number of the destination image. This is 1 so far, but this might change in the future.
ShaderDstImageCount = 1
// PreservedUniformVariablesCount represents the number of preserved uniform variables.

View File

@ -330,8 +330,13 @@ func (q *commandQueue) prependPreservedUniforms(uniforms []uint32, shader *Shade
copy(uniforms[graphics.PreservedUniformUint32Count:], origUniforms)
// Set the destination texture size.
// The number of destination images is always 1 but this might change in the future.
dw, dh := dsts[0].InternalSize()
var dw, dh int
for _, dst := range dsts {
if dst != nil {
dw, dh = dst.InternalSize()
break
}
}
uniforms[0] = math.Float32bits(float32(dw))
uniforms[1] = math.Float32bits(float32(dh))
uniformIndex := 2