From 6e38af063169258b99b7609953138ce81f4d5f98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 15 Aug 2018 21:39:52 -0400 Subject: [PATCH] radeonsi: move si_*_descriptors_idx functions into si_state.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested-by: Dieter Nützel Acked-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_descriptors.c | 14 -------------- src/gallium/drivers/radeonsi/si_state.h | 14 ++++++++++++++ 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 5b81214..9daf36f 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 e4b1cf7..116fce5 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. */ -- 2.7.4