mesa/st: inline st_max_shader_compiler_threads
authorDave Airlie <airlied@redhat.com>
Mon, 20 Dec 2021 05:21:44 +0000 (15:21 +1000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 21 Jan 2022 01:18:19 +0000 (01:18 +0000)
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>

src/mesa/main/hint.c
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_cb_program.h

index 648a524..1360796 100644 (file)
@@ -33,6 +33,7 @@
 #include "state_tracker/st_cb_program.h"
 #include "api_exec_decl.h"
 
+#include "pipe/p_screen.h"
 
 void GLAPIENTRY
 _mesa_Hint( GLenum target, GLenum mode )
@@ -139,7 +140,9 @@ _mesa_MaxShaderCompilerThreadsKHR(GLuint count)
 
    ctx->Hint.MaxShaderCompilerThreads = count;
 
-   st_max_shader_compiler_threads(ctx, count);
+   struct pipe_screen *screen = ctx->screen;
+   if (screen->set_max_shader_compiler_threads)
+      screen->set_max_shader_compiler_threads(screen, count);
 }
 
 /**********************************************************************/
index 48f85ab..4c19c27 100644 (file)
@@ -142,15 +142,6 @@ st_new_ati_fs(struct gl_context *ctx, struct ati_fragment_shader *curProg)
    return prog;
 }
 
-void
-st_max_shader_compiler_threads(struct gl_context *ctx, unsigned count)
-{
-   struct pipe_screen *screen = st_context(ctx)->screen;
-
-   if (screen->set_max_shader_compiler_threads)
-      screen->set_max_shader_compiler_threads(screen, count);
-}
-
 bool
 st_get_shader_program_completion_status(struct gl_context *ctx,
                                         struct gl_shader_program *shprog)
index 8ad62c2..fc60cb8 100644 (file)
@@ -42,7 +42,6 @@ GLboolean st_program_string_notify(struct gl_context *ctx,
                                    struct gl_program *prog);
 struct gl_program *st_new_ati_fs(struct gl_context *ctx, struct ati_fragment_shader *curProg);
 
-void st_max_shader_compiler_threads(struct gl_context *ctx, unsigned count);
 bool st_get_shader_program_completion_status(struct gl_context *ctx,
                                              struct gl_shader_program *shprog);