diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-10-16 18:09:25 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-10-19 22:25:27 +0200 |
commit | 91b033f4f6055f7ead57c8d6c454288b0b827257 (patch) | |
tree | 5c21bbaa19e9b3d2d2a2a44f66caeede1cfac162 /src/amd/vulkan/radv_shader.c | |
parent | ce03c119ce00f2341930d1fa8d26a43019a124e8 (diff) |
radv: Update GFX9 user data regs for GS/tess.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index ed76e1d0242..a7836543998 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -500,24 +500,35 @@ radv_shader_variant_destroy(struct radv_device *device, } uint32_t -radv_shader_stage_to_user_data_0(gl_shader_stage stage, bool has_gs, - bool has_tess) +radv_shader_stage_to_user_data_0(gl_shader_stage stage, enum chip_class chip_class, + bool has_gs, bool has_tess) { switch (stage) { case MESA_SHADER_FRAGMENT: return R_00B030_SPI_SHADER_USER_DATA_PS_0; case MESA_SHADER_VERTEX: + if (chip_class >= GFX9) { + return has_tess ? R_00B430_SPI_SHADER_USER_DATA_LS_0 : + has_gs ? R_00B330_SPI_SHADER_USER_DATA_ES_0 : + R_00B130_SPI_SHADER_USER_DATA_VS_0; + } if (has_tess) return R_00B530_SPI_SHADER_USER_DATA_LS_0; else return has_gs ? R_00B330_SPI_SHADER_USER_DATA_ES_0 : R_00B130_SPI_SHADER_USER_DATA_VS_0; case MESA_SHADER_GEOMETRY: - return R_00B230_SPI_SHADER_USER_DATA_GS_0; + return chip_class >= GFX9 ? R_00B330_SPI_SHADER_USER_DATA_ES_0 : + R_00B230_SPI_SHADER_USER_DATA_GS_0; case MESA_SHADER_COMPUTE: return R_00B900_COMPUTE_USER_DATA_0; case MESA_SHADER_TESS_CTRL: - return R_00B430_SPI_SHADER_USER_DATA_HS_0; + return chip_class >= GFX9 ? R_00B430_SPI_SHADER_USER_DATA_LS_0 : + R_00B430_SPI_SHADER_USER_DATA_HS_0; case MESA_SHADER_TESS_EVAL: + if (chip_class >= GFX9) { + return has_gs ? R_00B330_SPI_SHADER_USER_DATA_ES_0 : + R_00B130_SPI_SHADER_USER_DATA_VS_0; + } if (has_gs) return R_00B330_SPI_SHADER_USER_DATA_ES_0; else |