mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl: Initialize static temporaries_allocate_names once per process.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
a5299e9e1c
commit
9db278d0e2
1 changed files with 3 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ extern "C" {
|
|||
#include "main/core.h" /* for struct gl_context */
|
||||
#include "main/context.h"
|
||||
#include "main/shaderobj.h"
|
||||
#include "util/u_atomic.h" /* for p_atomic_cmpxchg */
|
||||
}
|
||||
|
||||
#include "util/ralloc.h"
|
||||
|
|
@ -1447,7 +1448,8 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
|
|||
const char *source = shader->Source;
|
||||
|
||||
if (ctx->Const.GenerateTemporaryNames)
|
||||
ir_variable::temporaries_allocate_names = true;
|
||||
(void) p_atomic_cmpxchg(&ir_variable::temporaries_allocate_names,
|
||||
false, true);
|
||||
|
||||
state->error = glcpp_preprocess(state, &source, &state->info_log,
|
||||
&ctx->Extensions, ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue