turnip/lrz: add support for VK_EXT_extended_dynamic_state

When the depth or stencil state changes dynamically, that might affect
LRZ state and we need to recalculate it and emit it again.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8615>
This commit is contained in:
Samuel Iglesias Gonsálvez
2021-01-21 09:55:03 +01:00
parent 6d6cbb7361
commit 54cf12774a
2 changed files with 4 additions and 17 deletions
@@ -131,20 +131,6 @@ dEQP-VK.image.subresource_layout.3d.all_levels.r8g8b8a8_snorm,Fail
dEQP-VK.info.device_mandatory_features,Fail
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.image.guard_nonlocal.workgroup.comp,Fail
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_nonlocal.workgroup.guard_local.image.comp,Fail
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_always_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_greater_equal_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.depth_compare_greater_equal_greater_then_equal,Fail
dEQP-VK.pipeline.extended_dynamic_state.before_draw.depth_compare_always_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.before_draw.depth_compare_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.before_draw.depth_compare_greater_equal_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.before_draw.depth_compare_greater_equal_greater_then_equal,Fail
dEQP-VK.pipeline.extended_dynamic_state.between_pipelines.depth_compare_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.cmd_buffer_start.depth_compare_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_compare_always_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_compare_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_compare_greater_equal_greater,Fail
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.depth_compare_greater_equal_greater_then_equal,Fail
dEQP-VK.pipeline.framebuffer_attachment.diff_attachments_2d_19x27_32x32_ms,Fail
dEQP-VK.pipeline.push_descriptor.compute.binding0_numcalls2_combined_image_sampler,Crash
dEQP-VK.pipeline.push_descriptor.compute.binding0_numcalls2_sampled_image,Crash
+4 -3
View File
@@ -3333,13 +3333,14 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
{
const struct tu_pipeline *pipeline = cmd->state.pipeline;
VkResult result;
bool dirty_lrz = cmd->state.dirty & (TU_CMD_DIRTY_LRZ | TU_CMD_DIRTY_RB_DEPTH_CNTL | TU_CMD_DIRTY_RB_STENCIL_CNTL);
struct tu_descriptor_state *descriptors_state =
&cmd->descriptors[VK_PIPELINE_BIND_POINT_GRAPHICS];
tu_emit_cache_flush_renderpass(cmd, cs);
if (cmd->state.dirty & TU_CMD_DIRTY_LRZ)
if (dirty_lrz)
cmd->state.lrz.state = tu6_build_lrz(cmd);
tu_cs_emit_regs(cs, A6XX_PC_PRIMITIVE_CNTL_0(
@@ -3455,7 +3456,7 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
((cmd->state.dirty & TU_CMD_DIRTY_SHADER_CONSTS) ? 5 : 0) +
((cmd->state.dirty & TU_CMD_DIRTY_DESC_SETS_LOAD) ? 1 : 0) +
((cmd->state.dirty & TU_CMD_DIRTY_VERTEX_BUFFERS) ? 1 : 0) +
((cmd->state.dirty & TU_CMD_DIRTY_LRZ) ? 1 : 0) +
(dirty_lrz ? 1 : 0) +
1; /* vs_params */
if ((cmd->state.dirty & TU_CMD_DIRTY_VB_STRIDE) &&
@@ -3487,7 +3488,7 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
}
tu_cs_emit_draw_state(cs, TU_DRAW_STATE_VS_PARAMS, cmd->state.vs_params);
if (cmd->state.dirty & TU_CMD_DIRTY_LRZ)
if (dirty_lrz)
tu_cs_emit_draw_state(cs, TU_DRAW_STATE_LRZ, cmd->state.lrz.state);
}