fix compute uniform access

d3d11
cosmonaut 2024-03-05 16:31:41 -08:00
parent 01e805c800
commit 6ebfabcecf
1 changed files with 1 additions and 1 deletions

View File

@ -930,7 +930,7 @@ static void D3D11_DispatchCompute(
uint32_t groupCountZ
) {
D3D11CommandBuffer* d3d11CommandBuffer = (D3D11CommandBuffer*)commandBuffer;
uint32_t computeOffsetInConstants = d3d11CommandBuffer->computeUniformBuffer->drawOffset / 16;
uint32_t computeOffsetInConstants = d3d11CommandBuffer->computeUniformBuffer != NULL ? d3d11CommandBuffer->computeUniformBuffer->drawOffset / 16 : 0;
uint32_t computeBlockSizeInConstants = (uint32_t) (d3d11CommandBuffer->computePipeline->computeUniformBlockSize / 16);
if (d3d11CommandBuffer->computeUniformBuffer != NULL)