diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-17 11:57:39 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-17 11:57:39 -0600 |
commit | ab9b2632635f79a664af36afda76829191dcd903 (patch) | |
tree | 93d2bea5b629f5bcd5a9a6f852fc33c576ecb485 | |
parent | 3817a54912a6c51fa0a7ec64787a69007bda44fa (diff) |
glsl: Added gl_shader_state::EmitContReturn field
This is the start of a glsl-continue-return feature branch to support
a GLSL code generator option for 'continue' and 'return' statements.
Some targets don't support CONT or RET statements so we'll need to
try to generate code that does not use them...
-rw-r--r-- | src/mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | src/mesa/shader/shader_api.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 71a85a9db8..39b08d7a58 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2048,6 +2048,7 @@ struct gl_shader_state struct gl_shader_program *CurrentProgram; /**< The user-bound program */ /** Driver-selectable options: */ GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ + GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */ GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index a8390d3094..648fbc186b 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -402,6 +402,7 @@ _mesa_init_shader_state(GLcontext * ctx) * are generated by the GLSL compiler. */ ctx->Shader.EmitHighLevelInstructions = GL_TRUE; + ctx->Shader.EmitContReturn = GL_TRUE; ctx->Shader.EmitCondCodes = GL_FALSE; ctx->Shader.EmitComments = GL_FALSE; ctx->Shader.Flags = get_shader_flags(); |