From daee177ca0285bac842b3485dfbb3d8591401261 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 10 Jun 2020 12:59:38 -0700 Subject: [PATCH] freedreno/a6xx: Define the register fields for polygon fill mode. Produced by comparing the traces of: dEQP-VK.rasterization.culling.front_triangles dEQP-VK.rasterization.culling.front_triangles_point dEQP-VK.rasterization.culling.front_triangles_line Part-of: --- src/freedreno/registers/a6xx.xml | 15 +++++++++++++-- src/freedreno/vulkan/tu_cmd_buffer.c | 4 ++-- src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index 32c280370b5..32a5c077855 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -159,6 +159,12 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> + + + + + + @@ -2530,7 +2536,9 @@ to upconvert to 32b float internally? - + + + @@ -2690,7 +2698,10 @@ 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 e59cabb9756..7371f9489ca 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -968,9 +968,9 @@ tu6_init_hw(struct tu_cmd_buffer *cmd, struct tu_cs *cs) tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9210, 0); tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9211, 0); tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9602, 0); - tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9981, 0x3); + tu_cs_emit_write_reg(cs, REG_A6XX_PC_POLYGON_MODE, POLYMODE6_TRIANGLES); 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_VPC_POLYGON_MODE, POLYMODE6_TRIANGLES); tu_cs_emit_write_reg(cs, REG_A6XX_SP_TP_UNKNOWN_B309, 0x000000a2); tu_cs_emit_write_reg(cs, REG_A6XX_HLSQ_CONTROL_5_REG, 0xfc); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index a55bb053e04..78000296625 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1194,9 +1194,9 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring) WRITE(REG_A6XX_VPC_UNKNOWN_9210, 0); WRITE(REG_A6XX_VPC_UNKNOWN_9211, 0); WRITE(REG_A6XX_VPC_UNKNOWN_9602, 0); - WRITE(REG_A6XX_PC_UNKNOWN_9981, 0x3); + WRITE(REG_A6XX_PC_POLYGON_MODE, POLYMODE6_TRIANGLES); WRITE(REG_A6XX_PC_UNKNOWN_9E72, 0); - WRITE(REG_A6XX_VPC_UNKNOWN_9108, 0x3); + WRITE(REG_A6XX_VPC_POLYGON_MODE, POLYMODE6_TRIANGLES); WRITE(REG_A6XX_SP_TP_SAMPLE_CONFIG, 0); /* NOTE blob seems to (mostly?) use 0xb2 for SP_TP_UNKNOWN_B309 * but this seems to kill texture gather offsets. -- 2.30.2