From: Jonathan Marek Date: Sat, 11 Jul 2020 19:55:12 +0000 (-0400) Subject: freedreno/regs: update a6xx PC regs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d00487dd4267980552ea2f783dd9bb07ce742fa9;p=mesa.git freedreno/regs: update a6xx PC regs Update some registers in the 0x9800-0xa000 range. Signed-off-by: Jonathan Marek Part-of: --- diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index b03bd3f327c..63e8e01058f 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -1592,16 +1592,6 @@ to upconvert to 32b float internally? - - - - - - - - - - @@ -2767,41 +2757,41 @@ to upconvert to 32b float internally? - + - + + + + - - - + + + - - - - - + + + + - - - + + - - - + + - + - - - + + + @@ -2816,19 +2806,21 @@ to upconvert to 32b float internally? - + + - + + @@ -2839,52 +2831,70 @@ to upconvert to 32b float internally? - + + - + geometry shader + + - size in vec4s of per-primitive storage for gs + size in vec4s of per-primitive storage for gs. TODO: not actually in VPC - + + + - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index c7c6df49a3f..e31f127f322 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -791,7 +791,6 @@ tu6_init_hw(struct tu_cmd_buffer *cmd, struct tu_cs *cs) tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9801, 0); tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9980, 0); - tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9990, 0); tu_cs_emit_write_reg(cs, REG_A6XX_PC_PRIMITIVE_CNTL_6, 0); tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9B07, 0); diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 249fd632a9a..b81482bd88c 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -893,8 +893,7 @@ tu6_emit_vpc(struct tu_cs *cs, tu_cs_emit_pkt4(cs, cfg->reg_gras_xs_layer_cntl, 1); tu_cs_emit(cs, CONDREG(layer_regid, A6XX_GRAS_GS_LAYER_CNTL_WRITES_LAYER)); - tu_cs_emit_pkt4(cs, REG_A6XX_PC_PRIMID_CNTL, 1); - tu_cs_emit(cs, COND(primid_passthru, A6XX_PC_PRIMID_CNTL_PRIMID_PASSTHRU)); + tu_cs_emit_regs(cs, A6XX_PC_PRIMID_PASSTHRU(primid_passthru)); tu_cs_emit_pkt4(cs, REG_A6XX_VPC_CNTL_0, 1); tu_cs_emit(cs, A6XX_VPC_CNTL_0_NUMNONPOSVAR(fs ? fs->total_in : 0) | @@ -2238,7 +2237,7 @@ tu_pipeline_builder_parse_rasterization(struct tu_pipeline_builder *builder, A6XX_VPC_POLYGON_MODE(mode)); tu_cs_emit_regs(&cs, - A6XX_PC_POLYGON_MODE(.mode = mode)); + A6XX_PC_POLYGON_MODE(mode)); /* move to hw ctx init? */ tu_cs_emit_regs(&cs, diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index 2260f17b6a1..dd52edcc35a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1190,7 +1190,6 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring) WRITE(REG_A6XX_VPC_SO_DISABLE, A6XX_VPC_SO_DISABLE(true).value); - WRITE(REG_A6XX_PC_UNKNOWN_9990, 0); WRITE(REG_A6XX_PC_UNKNOWN_9980, 0); WRITE(REG_A6XX_PC_UNKNOWN_9B07, 0); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 4ee227b027e..fb547560c44 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -831,8 +831,7 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen, if (fs->instrlen) fd6_emit_shader(ring, fs); - OUT_PKT4(ring, REG_A6XX_PC_PRIMID_CNTL, 1); - OUT_RING(ring, COND(primid_passthru, A6XX_PC_PRIMID_CNTL_PRIMID_PASSTHRU)); + OUT_REG(ring, A6XX_PC_PRIMID_PASSTHRU(primid_passthru)); uint32_t non_sysval_input_count = 0; for (uint32_t i = 0; i < vs->inputs_count; i++) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_rasterizer.c b/src/gallium/drivers/freedreno/a6xx/fd6_rasterizer.c index 692e14ed48d..33c96377a0a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_rasterizer.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_rasterizer.c @@ -108,7 +108,7 @@ __fd6_setup_rasterizer_stateobj(struct fd_context *ctx, } OUT_REG(ring, A6XX_VPC_POLYGON_MODE(mode)); - OUT_REG(ring, A6XX_PC_POLYGON_MODE(.mode = mode)); + OUT_REG(ring, A6XX_PC_POLYGON_MODE(mode)); return ring; }