summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 90d09720968..c4ef90372fb 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -196,8 +196,7 @@ enum {
*/
enum {
SI_SHADER_DESCS_CONST_AND_SHADER_BUFFERS,
- SI_SHADER_DESCS_SAMPLERS,
- SI_SHADER_DESCS_IMAGES,
+ SI_SHADER_DESCS_SAMPLERS_AND_IMAGES,
SI_NUM_SHADER_DESCS,
};
@@ -229,7 +228,7 @@ struct si_descriptors {
unsigned ce_offset;
/* elements of the list that are changed and need to be uploaded */
- unsigned dirty_mask;
+ uint64_t dirty_mask;
/* Whether CE is used to upload this descriptor array. */
bool uses_ce;
@@ -387,4 +386,16 @@ static inline unsigned si_get_shaderbuf_slot(unsigned slot)
return SI_NUM_SHADER_BUFFERS - 1 - slot;
}
+static inline unsigned si_get_sampler_slot(unsigned slot)
+{
+ /* samplers are in slots [8..39], ascending */
+ return SI_NUM_IMAGES / 2 + slot;
+}
+
+static inline unsigned si_get_image_slot(unsigned slot)
+{
+ /* images are in slots [15..0] (sampler slots [7..0]), descending */
+ return SI_NUM_IMAGES - 1 - slot;
+}
+
#endif