radeonsi/gfx10: implement si_emit_derived_tess_state
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 7 May 2019 22:54:46 +0000 (00:54 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jul 2019 19:51:12 +0000 (15:51 -0400)
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/drivers/radeonsi/si_state_draw.c

index b5540cb183128ef7da11f0204d21485ed3138416..ce63584d45690e22b1b55db1eb3e504645636e57 100644 (file)
@@ -258,8 +258,12 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
        assert(ls_current->config.lds_size == 0);
 
        if (sctx->chip_class >= GFX9) {
-               unsigned hs_rsrc2 = ls_current->config.rsrc2 |
-                                   S_00B42C_LDS_SIZE_GFX9(lds_size);
+               unsigned hs_rsrc2 = ls_current->config.rsrc2;
+
+               if (sctx->chip_class >= GFX10)
+                       hs_rsrc2 |= S_00B42C_LDS_SIZE_GFX10(lds_size);
+               else
+                       hs_rsrc2 |= S_00B42C_LDS_SIZE_GFX9(lds_size);
 
                radeon_set_sh_reg(cs, R_00B42C_SPI_SHADER_PGM_RSRC2_HS, hs_rsrc2);