mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 23:17:27 +01:00
internal/graphicscommand: move the const check outside of the function
old.txt: 1fe988eabf
new.txt: this commit
```
benchstat old.txt new.txt
goos: darwin
goarch: arm64
pkg: github.com/hajimehoshi/ebiten/v2/internal/graphicscommand
cpu: Apple M3 Pro
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
PrependPreservedUniforms-12 19.79n ± 4% 18.84n ± 2% -4.80% (p=0.001 n=10)
```
Updates #3144
This commit is contained in:
parent
1fe988eabf
commit
ecc42d4042
@ -465,12 +465,12 @@ func prependPreservedUniforms(uniforms []uint32, shader *Shader, dst *Image, src
|
||||
uniforms[44] = 0
|
||||
uniforms[45] = math.Float32bits(1)
|
||||
|
||||
// Confirm the concrete value of graphics.PreservedUniformUint32Count.
|
||||
var _ [0]struct{} = [graphics.PreservedUniformUint32Count - 46]struct{}{}
|
||||
|
||||
return uniforms
|
||||
}
|
||||
|
||||
// Confirm the concrete value of graphics.PreservedUniformUint32Count.
|
||||
var _ [0]struct{} = [graphics.PreservedUniformUint32Count - 46]struct{}{}
|
||||
|
||||
type commandQueuePool struct {
|
||||
cache []*commandQueue
|
||||
m sync.Mutex
|
||||
|
Loading…
Reference in New Issue
Block a user