radeonsi/gfx9: use SPI_SHADER_USER_DATA_COMMON
authorMarek Olšák <marek.olsak@amd.com>
Sat, 7 Oct 2017 19:34:03 +0000 (21:34 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 17 Oct 2017 20:03:03 +0000 (22:03 +0200)
IB size: -0.4%

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c

index 9ba8df6..6e1fd80 100644 (file)
@@ -1976,25 +1976,25 @@ static void si_emit_shader_pointer(struct si_context *sctx,
 static void si_emit_global_shader_pointers(struct si_context *sctx,
                                           struct si_descriptors *descs)
 {
+       if (sctx->b.chip_class == GFX9) {
+               /* Broadcast it to all shader stages. */
+               si_emit_shader_pointer(sctx, descs,
+                                      R_00B530_SPI_SHADER_USER_DATA_COMMON_0);
+               return;
+       }
+
        si_emit_shader_pointer(sctx, descs,
                               R_00B030_SPI_SHADER_USER_DATA_PS_0);
        si_emit_shader_pointer(sctx, descs,
                               R_00B130_SPI_SHADER_USER_DATA_VS_0);
        si_emit_shader_pointer(sctx, descs,
                               R_00B330_SPI_SHADER_USER_DATA_ES_0);
-
-       if (sctx->b.chip_class >= GFX9) {
-               /* GFX9 merged LS-HS and ES-GS. */
-               si_emit_shader_pointer(sctx, descs,
-                                      R_00B430_SPI_SHADER_USER_DATA_LS_0);
-       } else {
-               si_emit_shader_pointer(sctx, descs,
-                                      R_00B230_SPI_SHADER_USER_DATA_GS_0);
-               si_emit_shader_pointer(sctx, descs,
-                                      R_00B430_SPI_SHADER_USER_DATA_HS_0);
-               si_emit_shader_pointer(sctx, descs,
-                                      R_00B530_SPI_SHADER_USER_DATA_LS_0);
-       }
+       si_emit_shader_pointer(sctx, descs,
+                              R_00B230_SPI_SHADER_USER_DATA_GS_0);
+       si_emit_shader_pointer(sctx, descs,
+                              R_00B430_SPI_SHADER_USER_DATA_HS_0);
+       si_emit_shader_pointer(sctx, descs,
+                              R_00B530_SPI_SHADER_USER_DATA_LS_0);
 }
 
 void si_emit_graphics_shader_pointers(struct si_context *sctx,