Compare commits

..

4 Commits

Author SHA1 Message Date
Bertrand Jung
7aa253218a
Merge 21107b1f3f into ffb77757f0 2024-06-14 18:28:03 +02:00
Zyko
21107b1f3f Follow go const comment convention 2024-06-14 18:27:56 +02:00
Zyko
74a83cfe7b Extra comment at constant definition 2024-06-14 18:05:55 +02:00
Zyko
8abc922e89 Always take the first destination image + comment 2024-06-14 18:03:42 +02:00
2 changed files with 3 additions and 7 deletions

View File

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