diff options
author | Dave Airlie <[email protected]> | 2017-08-21 06:00:49 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-08-29 19:14:12 +0100 |
commit | 9b856ea323a5aafebd632f8cdc3e3cd4ec6c080a (patch) | |
tree | c464538613564988e54ed706adc8c4f115b4b32d | |
parent | d8f8689101fbf52ed174127b69af31931473bb99 (diff) |
radv/gfx9: fixup db/stencil disable.
This fixes disabled Z/stencil.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Cc: "17.2" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit d987b4ab9e240b479c71129c3c261982112c57d8)
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 0a4d919d41c..0cb5f8ea4ac 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1248,9 +1248,13 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer) } radv_load_depth_clear_regs(cmd_buffer, image); } else { - radeon_set_context_reg_seq(cmd_buffer->cs, R_028040_DB_Z_INFO, 2); - radeon_emit(cmd_buffer->cs, S_028040_FORMAT(V_028040_Z_INVALID)); /* R_028040_DB_Z_INFO */ - radeon_emit(cmd_buffer->cs, S_028044_FORMAT(V_028044_STENCIL_INVALID)); /* R_028044_DB_STENCIL_INFO */ + if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) + radeon_set_context_reg_seq(cmd_buffer->cs, R_028038_DB_Z_INFO, 2); + else + radeon_set_context_reg_seq(cmd_buffer->cs, R_028040_DB_Z_INFO, 2); + + radeon_emit(cmd_buffer->cs, S_028040_FORMAT(V_028040_Z_INVALID)); /* DB_Z_INFO */ + radeon_emit(cmd_buffer->cs, S_028044_FORMAT(V_028044_STENCIL_INVALID)); /* DB_STENCIL_INFO */ } radeon_set_context_reg(cmd_buffer->cs, R_028208_PA_SC_WINDOW_SCISSOR_BR, S_028208_BR_X(framebuffer->width) | |