gpu: fix segfault on invalid depth format

This commit is contained in:
DH 2024-10-22 15:18:31 +03:00
parent 5d1fb82cc4
commit 2432a5cc74

View file

@ -187,7 +187,7 @@ void amdgpu::draw(GraphicsPipe &pipe, int vmId, std::uint32_t firstVertex,
auto depthAccess = Access::None;
auto stencilAccess = Access::None;
if (pipe.context.dbDepthControl.depthEnable) {
if (pipe.context.dbDepthControl.depthEnable && pipe.context.dbZInfo.format != gnm::kZFormatInvalid) {
if (!pipe.context.dbRenderControl.depthClearEnable) {
depthAccess |= Access::Read;
}