From 6ebfabcecf6aad15ecf82ea884f23c8f4671ab9f Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 5 Mar 2024 16:31:41 -0800 Subject: [PATCH] fix compute uniform access --- src/Refresh_Driver_D3D11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Refresh_Driver_D3D11.c b/src/Refresh_Driver_D3D11.c index 1ebf457..b9477f9 100644 --- a/src/Refresh_Driver_D3D11.c +++ b/src/Refresh_Driver_D3D11.c @@ -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)