Browse Source

glsl: Initialize static temporaries_allocate_names once per process.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
tags/10.5-branchpoint
Matt Turner 10 years ago
parent
commit
9db278d0e2
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/glsl/glsl_parser_extras.cpp

+ 3
- 1
src/glsl/glsl_parser_extras.cpp View File

#include "main/core.h" /* for struct gl_context */ #include "main/core.h" /* for struct gl_context */
#include "main/context.h" #include "main/context.h"
#include "main/shaderobj.h" #include "main/shaderobj.h"
#include "util/u_atomic.h" /* for p_atomic_cmpxchg */
} }


#include "util/ralloc.h" #include "util/ralloc.h"
const char *source = shader->Source; const char *source = shader->Source;


if (ctx->Const.GenerateTemporaryNames) 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, state->error = glcpp_preprocess(state, &source, &state->info_log,
&ctx->Extensions, ctx); &ctx->Extensions, ctx);

Loading…
Cancel
Save