aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-05-13 17:16:27 +0200
committerMarek Olšák <[email protected]>2017-05-18 22:15:02 +0200
commitf07c15ef807fb50659bf7a648393991f582f6a7f (patch)
tree655aa9b467c21b3455362fd55ab5b645c37fd3dd /src/gallium/drivers/radeonsi/si_shader.h
parent5df24c3fa627243c259f5266359098463e41d172 (diff)
radeonsi: merge sampler and image descriptor lists into one
Sampler slots: slot[8], .. slot[39] (ascending) Image slots: slot[7], .. slot[0] (descending) Each image occupies 1/2 of each slot, so there are 16 images in total, therefore the layout is: slot[15], .. slot[0]. (in 1/2 slot increments) Updating image slot 2n+i (i <= 1) also dirties and re-uploads slot 2n+!i. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 08e809c56b7..ffb7dc3b81d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -159,10 +159,8 @@ enum {
SI_SGPR_RW_BUFFERS_HI,
SI_SGPR_CONST_AND_SHADER_BUFFERS,
SI_SGPR_CONST_AND_SHADER_BUFFERS_HI,
- SI_SGPR_SAMPLERS, /* images & sampler states interleaved */
- SI_SGPR_SAMPLERS_HI,
- SI_SGPR_IMAGES,
- SI_SGPR_IMAGES_HI,
+ SI_SGPR_SAMPLERS_AND_IMAGES,
+ SI_SGPR_SAMPLERS_AND_IMAGES_HI,
SI_NUM_RESOURCE_SGPRS,
/* all VS variants */
@@ -197,19 +195,15 @@ enum {
GFX9_SGPR_unused_to_align_the_next_pointer,
GFX9_SGPR_TCS_CONST_AND_SHADER_BUFFERS,
GFX9_SGPR_TCS_CONST_AND_SHADER_BUFFERS_HI,
- GFX9_SGPR_TCS_SAMPLERS, /* images & sampler states interleaved */
- GFX9_SGPR_TCS_SAMPLERS_HI,
- GFX9_SGPR_TCS_IMAGES,
- GFX9_SGPR_TCS_IMAGES_HI,
+ GFX9_SGPR_TCS_SAMPLERS_AND_IMAGES,
+ GFX9_SGPR_TCS_SAMPLERS_AND_IMAGES_HI,
GFX9_TCS_NUM_USER_SGPR,
/* GFX9: Merged ES-GS (VS-GS or TES-GS). */
GFX9_SGPR_GS_CONST_AND_SHADER_BUFFERS = SI_VS_NUM_USER_SGPR,
GFX9_SGPR_GS_CONST_AND_SHADER_BUFFERS_HI,
- GFX9_SGPR_GS_SAMPLERS,
- GFX9_SGPR_GS_SAMPLERS_HI,
- GFX9_SGPR_GS_IMAGES,
- GFX9_SGPR_GS_IMAGES_HI,
+ GFX9_SGPR_GS_SAMPLERS_AND_IMAGES,
+ GFX9_SGPR_GS_SAMPLERS_AND_IMAGES_HI,
GFX9_GS_NUM_USER_SGPR,
/* GS limits */
@@ -223,7 +217,7 @@ enum {
/* LLVM function parameter indices */
enum {
- SI_NUM_RESOURCE_PARAMS = 4,
+ SI_NUM_RESOURCE_PARAMS = 3,
/* PS only parameters */
SI_PARAM_ALPHA_REF = SI_NUM_RESOURCE_PARAMS,