turnip: move HLSQ_UPDATE_CNTL write to before xs config writes
authorJonathan Marek <jonathan@marek.ca>
Sun, 7 Jun 2020 17:06:42 +0000 (13:06 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 8 Jun 2020 18:08:23 +0000 (18:08 +0000)
This matches the blob and gallium driver more closely, and fixes a
rendering issue observed on a650.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5376>

src/freedreno/vulkan/tu_pipeline.c

index 158297d9d17c3cee3d064bb36e08902af1246cdb..f86d322dc530ea6654cd4adf5e5bdd878eb5d4f6 100644 (file)
@@ -1294,9 +1294,6 @@ tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs)
    tu_cs_emit_pkt4(cs, REG_A6XX_HLSQ_UNKNOWN_B980, 1);
    tu_cs_emit(cs, enable_varyings ? 3 : 1);
 
-   tu_cs_emit_pkt4(cs, REG_A6XX_HLSQ_UPDATE_CNTL, 1);
-   tu_cs_emit(cs, 0xff); /* XXX */
-
    tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_CNTL, 1);
    tu_cs_emit(cs,
          CONDREG(ij_pix_regid, A6XX_GRAS_CNTL_VARYING) |
@@ -1587,6 +1584,9 @@ tu6_emit_program(struct tu_cs *cs,
       fs = &dummy_variant;
    }
 
+   tu_cs_emit_pkt4(cs, REG_A6XX_HLSQ_UPDATE_CNTL, 1);
+   tu_cs_emit(cs, 0xff); /* XXX */
+
    tu6_emit_vs_config(cs, builder->shaders[MESA_SHADER_VERTEX], vs);
    tu6_emit_hs_config(cs, builder->shaders[MESA_SHADER_TESS_CTRL], hs);
    tu6_emit_ds_config(cs, builder->shaders[MESA_SHADER_TESS_EVAL], ds);