From a9d866910c59a2e9e0c001b2d5f337205d8c3c1f Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Tue, 23 Jun 2020 18:44:42 -0400 Subject: [PATCH] freedreno/registers: a6xx depth bounds test registers Signed-off-by: Jonathan Marek Part-of: --- src/freedreno/registers/a6xx.xml | 12 +++++++----- src/freedreno/vulkan/tu_cmd_buffer.c | 4 ++-- src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index 9699caefb8d..32c280370b5 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -2300,8 +2300,12 @@ to upconvert to 32b float internally? - Z_TEST_ENABLE bit is set for zfunc other than GL_ALWAYS or GL_NEVER + + Z_TEST_ENABLE bit is set for zfunc other than GL_ALWAYS or GL_NEVER + also set when Z_BOUNDS_ENABLE is set + + @@ -2319,10 +2323,8 @@ to upconvert to 32b float internally? - - - - + + diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index c98834b6977..4926ef42e8c 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -971,8 +971,8 @@ tu6_init_hw(struct tu_cmd_buffer *cmd, struct tu_cs *cs) tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9E72, 0); tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9108, 0x3); tu_cs_emit_write_reg(cs, REG_A6XX_SP_TP_UNKNOWN_B309, 0x000000a2); - tu_cs_emit_write_reg(cs, REG_A6XX_RB_UNKNOWN_8878, 0); - tu_cs_emit_write_reg(cs, REG_A6XX_RB_UNKNOWN_8879, 0); + tu_cs_emit_write_reg(cs, REG_A6XX_RB_Z_BOUNDS_MIN, 0); + tu_cs_emit_write_reg(cs, REG_A6XX_RB_Z_BOUNDS_MAX, 0); tu_cs_emit_write_reg(cs, REG_A6XX_HLSQ_CONTROL_5_REG, 0xfc); tu_cs_emit_write_reg(cs, REG_A6XX_VFD_MODE_CNTL, 0x00000000); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index ed6dcf3239e..a55bb053e04 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1204,8 +1204,8 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring) WRITE(REG_A6XX_SP_TP_UNKNOWN_B309, 0xa2); WRITE(REG_A6XX_RB_SAMPLE_CONFIG, 0); WRITE(REG_A6XX_GRAS_SAMPLE_CONFIG, 0); - WRITE(REG_A6XX_RB_UNKNOWN_8878, 0); - WRITE(REG_A6XX_RB_UNKNOWN_8879, 0); + WRITE(REG_A6XX_RB_Z_BOUNDS_MIN, 0); + WRITE(REG_A6XX_RB_Z_BOUNDS_MAX, 0); WRITE(REG_A6XX_HLSQ_CONTROL_5_REG, 0xfc); emit_marker6(ring, 7); -- 2.30.2