internal/graphicsdriver/directx: fix a suspicious error chceck

This commit is contained in:
Hajime Hoshi 2022-07-14 01:45:21 +09:00
parent 1daf3bd8ff
commit 6f182d1124

View File

@ -361,7 +361,7 @@ func (p *pipelineStates) builtinGraphicsPipelineState(device *_ID3D12Device, key
func (p *pipelineStates) useGraphicsPipelineState(device *_ID3D12Device, commandList *_ID3D12GraphicsCommandList, frameIndex int, pipelineState *_ID3D12PipelineState, srcs [graphics.ShaderImageCount]*Image, uniforms []float32) error {
idx := len(p.constantBuffers[frameIndex])
if idx >= numDescriptorsPerFrame*2 {
if idx >= numDescriptorsPerFrame {
return fmt.Errorf("directx: too many constant buffers")
}