aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-08-04 16:48:30 +0200
committerNicolai Hähnle <[email protected]>2017-08-22 09:50:55 +0200
commit40697e8678f5cc1a64ff2fbc7456e81e5147b7a2 (patch)
tree84df447a30116a100e6b056638fc8eb5d2e0d086
parent4bbf6ded20522028262ab17f56603b904d2f8b85 (diff)
radeonsi: make si_shader_selector_reference globally visible
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h14
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c17
2 files changed, 16 insertions, 15 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index e44d71c2614..c41b10714e5 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -663,4 +663,18 @@ si_shader_uses_bindless_images(struct si_shader_selector *selector)
return selector ? selector->info.uses_bindless_images : false;
}
+void si_destroy_shader_selector(struct si_context *sctx,
+ struct si_shader_selector *sel);
+
+static inline void
+si_shader_selector_reference(struct si_context *sctx,
+ struct si_shader_selector **dst,
+ struct si_shader_selector *src)
+{
+ if (pipe_reference(&(*dst)->reference, &src->reference))
+ si_destroy_shader_selector(sctx, *dst);
+
+ *dst = src;
+}
+
#endif
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index de5260ccd8f..968e231b8b8 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1534,19 +1534,6 @@ static bool si_check_missing_main_part(struct si_screen *sscreen,
return true;
}
-static void si_destroy_shader_selector(struct si_context *sctx,
- struct si_shader_selector *sel);
-
-static void si_shader_selector_reference(struct si_context *sctx,
- struct si_shader_selector **dst,
- struct si_shader_selector *src)
-{
- if (pipe_reference(&(*dst)->reference, &src->reference))
- si_destroy_shader_selector(sctx, *dst);
-
- *dst = src;
-}
-
/* Select the hw shader variant depending on the current state. */
static int si_shader_select_with_key(struct si_screen *sscreen,
struct si_shader_ctx_state *state,
@@ -2447,8 +2434,8 @@ static void si_delete_shader(struct si_context *sctx, struct si_shader *shader)
free(shader);
}
-static void si_destroy_shader_selector(struct si_context *sctx,
- struct si_shader_selector *sel)
+void si_destroy_shader_selector(struct si_context *sctx,
+ struct si_shader_selector *sel)
{
struct si_shader *p = sel->first_variant, *c;
struct si_shader_ctx_state *current_shader[SI_NUM_SHADERS] = {