summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-15 21:39:52 -0400
committerMarek Olšák <[email protected]>2019-05-16 13:06:53 -0400
commit6e38af063169258b99b7609953138ce81f4d5f98 (patch)
tree3880c0f8b8ab0c778dfd95310ff5079163f7815a /src/gallium
parent49a016ec5d77e8401556bbd8cad386457537eb30 (diff)
radeonsi: move si_*_descriptors_idx functions into si_state.h
Tested-by: Dieter Nützel <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c14
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 5b812149754..9daf36f6c40 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -220,13 +220,6 @@ si_get_sampler_view_priority(struct si_resource *res)
return RADEON_PRIO_SAMPLER_TEXTURE;
}
-static unsigned
-si_sampler_and_image_descriptors_idx(unsigned shader)
-{
- return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS +
- SI_SHADER_DESCS_SAMPLERS_AND_IMAGES;
-}
-
static struct si_descriptors *
si_sampler_and_image_descriptors(struct si_context *sctx, unsigned shader)
{
@@ -1175,13 +1168,6 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
/* CONSTANT BUFFERS */
-static unsigned
-si_const_and_shader_buffer_descriptors_idx(unsigned shader)
-{
- return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS +
- SI_SHADER_DESCS_CONST_AND_SHADER_BUFFERS;
-}
-
static struct si_descriptors *
si_const_and_shader_buffer_descriptors(struct si_context *sctx, unsigned shader)
{
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index e4b1cf79132..116fce5b146 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -394,6 +394,20 @@ enum {
PIPE_SHADER_##name * SI_NUM_SHADER_DESCS, \
SI_NUM_SHADER_DESCS)
+static inline unsigned
+si_const_and_shader_buffer_descriptors_idx(unsigned shader)
+{
+ return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS +
+ SI_SHADER_DESCS_CONST_AND_SHADER_BUFFERS;
+}
+
+static inline unsigned
+si_sampler_and_image_descriptors_idx(unsigned shader)
+{
+ return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS +
+ SI_SHADER_DESCS_SAMPLERS_AND_IMAGES;
+}
+
/* This represents descriptors in memory, such as buffer resources,
* image resources, and sampler states.
*/