瀏覽代碼

glsl2: Preprocessed source doesn't need to live past compile time.

tags/mesa-7.9-rc1
Kenneth Graunke 15 年之前
父節點
當前提交
629198b96a
共有 2 個文件被更改,包括 2 次插入8 次删除
  1. 1
    4
      src/glsl/main.cpp
  2. 1
    4
      src/mesa/shader/ir_to_mesa.cpp

+ 1
- 4
src/glsl/main.cpp 查看文件

@@ -129,11 +129,8 @@ compile_shader(struct gl_shader *shader)

state->Const.MaxDrawBuffers = 2;

/* Create a new context for the preprocessor output. Ultimately, this
* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
state->error = preprocess(shader, &source, &state->info_log);
state->error = preprocess(state, &source, &state->info_log);

if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);

+ 1
- 4
src/mesa/shader/ir_to_mesa.cpp 查看文件

@@ -1679,11 +1679,8 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)

state->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;

/* Create a new context for the preprocessor output. Ultimately, this
* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
state->error = preprocess(shader, &source, &state->info_log);
state->error = preprocess(state, &source, &state->info_log);

if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);

Loading…
取消
儲存