diff options
author | Gregory Hainaut <[email protected]> | 2013-05-03 19:44:10 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-03-25 10:25:25 -0700 |
commit | c03477050a6f51e601f75cb3c061a3e16a5b7171 (patch) | |
tree | a39b3a0ad845e232612a6dbb305083e585f643bb /src/mesa/main/state.c | |
parent | b2bddaf7a000bf9830a7947b18d8e31fb25353ae (diff) |
mesa/sso: rename Shader to the pointer _Shader
Basically a sed but shaderapi.c and get.c.
get.c => GL_CURRENT_PROGAM always refer to the "old" UseProgram behavior
shaderapi.c => the old api stil update the Shader object directly
V2: formatting improvement
V3 (idr):
* Rebase fixes after a block of code was moved from ir_to_mesa.cpp to
shaderapi.c.
* Trivial reformatting.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r-- | src/mesa/main/state.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 0866a140f49..c122c16aae3 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -95,11 +95,11 @@ static GLbitfield update_program(struct gl_context *ctx) { const struct gl_shader_program *vsProg = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; const struct gl_shader_program *gsProg = - ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; + ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; struct gl_shader_program *fsProg = - ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]; + ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT]; const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current; const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current; const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current; @@ -125,7 +125,7 @@ update_program(struct gl_context *ctx) && fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]) { /* Use GLSL fragment shader */ _mesa_reference_shader_program(ctx, - &ctx->Shader._CurrentFragmentProgram, + &ctx->_Shader->_CurrentFragmentProgram, fsProg); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, gl_fragment_program(fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program)); @@ -135,7 +135,7 @@ update_program(struct gl_context *ctx) else if (ctx->FragmentProgram._Enabled) { /* Use user-defined fragment program */ _mesa_reference_shader_program(ctx, - &ctx->Shader._CurrentFragmentProgram, + &ctx->_Shader->_CurrentFragmentProgram, NULL); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, ctx->FragmentProgram.Current); @@ -147,7 +147,7 @@ update_program(struct gl_context *ctx) struct gl_shader_program *f = _mesa_get_fixed_func_fragment_program(ctx); _mesa_reference_shader_program(ctx, - &ctx->Shader._CurrentFragmentProgram, + &ctx->_Shader->_CurrentFragmentProgram, f); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, gl_fragment_program(f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program)); @@ -310,7 +310,7 @@ update_multisample(struct gl_context *ctx) static void update_twoside(struct gl_context *ctx) { - if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] || + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] || ctx->VertexProgram._Enabled) { ctx->VertexProgram._TwoSideEnabled = ctx->VertexProgram.TwoSideEnabled; } else { |