diff options
Diffstat (limited to 'src')
32 files changed, 124 insertions, 110 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 76cbb41a9d0..0abdfb2cada 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -537,10 +537,10 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) for (i = 0; i < MESA_SHADER_STAGES; i++) { _mesa_reference_shader_program(ctx, &save->Shader[i], - ctx->Shader.CurrentProgram[i]); + ctx->_Shader->CurrentProgram[i]); } _mesa_reference_shader_program(ctx, &save->ActiveShader, - ctx->Shader.ActiveProgram); + ctx->_Shader->ActiveProgram); _mesa_UseProgram(0); } @@ -893,7 +893,7 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER, save->Shader[MESA_SHADER_FRAGMENT]); - _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, + _mesa_reference_shader_program(ctx, &ctx->_Shader->ActiveProgram, save->ActiveShader); for (i = 0; i < MESA_SHADER_STAGES; i++) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index bd5bf14cde1..ddfb296f2c1 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -187,7 +187,7 @@ static void populate_key(struct brw_context *brw, /* BRW_NEW_TRANSFORM_FEEDBACK */ if (_mesa_is_xfb_active_and_unpaused(ctx)) { const struct gl_shader_program *shaderprog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; const struct gl_transform_feedback_info *linked_xfb_info = &shaderprog->LinkedTransformFeedback; int i; diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c index 0795e56580e..26a3fa89e39 100644 --- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c @@ -70,7 +70,7 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw) /* _NEW_PROGRAM */ struct gl_shader_program *prog = - ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; + ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; if (!prog) return; @@ -95,7 +95,7 @@ brw_upload_gs_abo_surfaces(struct brw_context *brw) struct gl_context *ctx = &brw->ctx; /* _NEW_PROGRAM */ struct gl_shader_program *prog = - ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; + ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; if (prog) { /* CACHE_NEW_GS_PROG */ diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 407319b4d8d..bbc5f3def3d 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -248,7 +248,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) _mesa_reference_program(ctx, &prog, NULL); - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { fprintf(stderr, "\n"); fprintf(stderr, "GLSL IR for linked %s program %d:\n", _mesa_shader_stage_to_string(shader->base.Stage), @@ -258,7 +258,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) } } - if ((ctx->Shader.Flags & GLSL_DUMP) && shProg->Name != 0) { + if ((ctx->_Shader->Flags & GLSL_DUMP) && shProg->Name != 0) { for (unsigned i = 0; i < shProg->NumShaders; i++) { const struct gl_shader *sh = shProg->Shaders[i]; if (!sh) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c index 8a9625b52af..b48c420a9fb 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c @@ -306,7 +306,7 @@ brw_upload_gs_prog(struct brw_context *brw) &key, sizeof(key), &stage_state->prog_offset, &brw->gs.prog_data)) { bool success = - do_gs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY], gp, + do_gs_prog(brw, ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY], gp, &key); assert(success); } diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index d98f1950726..e0f32b3333f 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -147,7 +147,7 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map, */ gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx) { - if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]) { + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) { /* There is currently a GLSL vertex shader, so clip according to GLSL * rules, which means compare gl_ClipVertex (or gl_Position, if * gl_ClipVertex wasn't assigned) against the eye-coordinate clip planes @@ -484,7 +484,7 @@ static void brw_upload_vs_prog(struct brw_context *brw) &key, sizeof(key), &brw->vs.base.prog_offset, &brw->vs.prog_data)) { bool success = - do_vs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX], vp, + do_vs_prog(brw, ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX], vp, &key); (void) success; assert(success); diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 8f611242fc9..bd97a22f63c 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -131,7 +131,7 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw) struct gl_context *ctx = &brw->ctx; /* _NEW_PROGRAM */ struct gl_shader_program *prog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; if (!prog) return; @@ -156,7 +156,7 @@ brw_upload_vs_abo_surfaces(struct brw_context *brw) struct gl_context *ctx = &brw->ctx; /* _NEW_PROGRAM */ struct gl_shader_program *prog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; if (prog) { /* CACHE_NEW_VS_PROG */ diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 0d0d6ec82ff..b97501c5d19 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -579,7 +579,7 @@ brw_upload_wm_prog(struct brw_context *brw) if (!brw_search_cache(&brw->cache, BRW_WM_PROG, &key, sizeof(key), &brw->wm.base.prog_offset, &brw->wm.prog_data)) { - bool success = do_wm_prog(brw, ctx->Shader._CurrentFragmentProgram, fp, + bool success = do_wm_prog(brw, ctx->_Shader->_CurrentFragmentProgram, fp, &key); (void) success; assert(success); diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index a0bb4bafaa3..61f7ba5daf7 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -881,7 +881,7 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw) { struct gl_context *ctx = &brw->ctx; /* _NEW_PROGRAM */ - struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram; + struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram; if (!prog) return; diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c index 0047c8aa76e..e1c1b3cb060 100644 --- a/src/mesa/drivers/dri/i965/gen6_sol.c +++ b/src/mesa/drivers/dri/i965/gen6_sol.c @@ -43,7 +43,7 @@ gen6_update_sol_surfaces(struct brw_context *brw) ctx->TransformFeedback.CurrentObject; /* BRW_NEW_VERTEX_PROGRAM */ const struct gl_shader_program *shaderprog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; const struct gl_transform_feedback_info *linked_xfb_info = &shaderprog->LinkedTransformFeedback; int i; @@ -89,7 +89,7 @@ brw_gs_upload_binding_table(struct brw_context *brw) struct gl_context *ctx = &brw->ctx; /* BRW_NEW_VERTEX_PROGRAM */ const struct gl_shader_program *shaderprog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; bool has_surfaces = false; uint32_t *bind; @@ -175,7 +175,7 @@ brw_begin_transform_feedback(struct gl_context *ctx, GLenum mode, { struct brw_context *brw = brw_context(ctx); const struct gl_shader_program *vs_prog = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; const struct gl_transform_feedback_info *linked_xfb_info = &vs_prog->LinkedTransformFeedback; struct gl_transform_feedback_object *xfb_obj = diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c index 5e9bb660d54..0af87d1f4df 100644 --- a/src/mesa/drivers/dri/i965/gen6_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c @@ -158,7 +158,7 @@ upload_vs_state(struct brw_context *brw) /* Use ALT floating point mode for ARB vertex programs, because they * require 0^0 == 1. */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] == NULL) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] == NULL) floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT; BEGIN_BATCH(6); diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c index e7c955589ff..22e0925091e 100644 --- a/src/mesa/drivers/dri/i965/gen6_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c @@ -140,7 +140,7 @@ upload_wm_state(struct brw_context *brw) * rendering, CurrentProgram[MESA_SHADER_FRAGMENT] is used for this check * to differentiate between the GLSL and non-GLSL cases. */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] == NULL) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] == NULL) dw2 |= GEN6_WM_FLOATING_POINT_MODE_ALT; /* CACHE_NEW_SAMPLER */ diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965/gen7_vs_state.c index 0d9859bec59..b5fc871cfe1 100644 --- a/src/mesa/drivers/dri/i965/gen7_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen7_vs_state.c @@ -87,7 +87,7 @@ upload_vs_state(struct brw_context *brw) /* Use ALT floating point mode for ARB vertex programs, because they * require 0^0 == 1. */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] == NULL) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] == NULL) floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT; BEGIN_BATCH(6); diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index ca3e2753935..71535a53fa1 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -168,7 +168,7 @@ upload_ps_state(struct brw_context *brw) * to differentiate between the GLSL and non-GLSL cases. */ /* BRW_NEW_FRAGMENT_PROGRAM */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] == NULL) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] == NULL) dw2 |= GEN7_PS_FLOATING_POINT_MODE_ALT; /* Haswell requires the sample mask to be set in this packet as well as diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index f3fd1a47569..efc3a2b4be4 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -129,7 +129,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function) case API_OPENGL_CORE: { const struct gl_shader_program *vsProg = - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; GLboolean haveVertexShader = (vsProg && vsProg->LinkStatus); GLboolean haveVertexProgram = ctx->VertexProgram._Enabled; if (haveVertexShader || haveVertexProgram) { @@ -270,9 +270,9 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) * TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB. * */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) { + if (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) { const GLenum geom_mode = - ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.InputType; + ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.InputType; switch (mode) { case GL_POINTS: valid_enum = (geom_mode == GL_POINTS); @@ -331,8 +331,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) if (_mesa_is_xfb_active_and_unpaused(ctx)) { GLboolean pass = GL_TRUE; - if(ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) { - switch (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) { + if(ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) { + switch (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) { case GL_POINTS: pass = ctx->TransformFeedback.Mode == GL_POINTS; break; diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index cd009c11597..5d580fab786 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1855,7 +1855,7 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) _mesa_update_state(ctx); for (i = 0; i < MESA_SHADER_COMPUTE; i++) { - if (!shader_linked_or_absent(ctx, ctx->Shader.CurrentProgram[i], + if (!shader_linked_or_absent(ctx, ctx->_Shader->CurrentProgram[i], &from_glsl_shader[i], where)) return GL_FALSE; } @@ -1903,8 +1903,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) } #ifdef DEBUG - if (ctx->Shader.Flags & GLSL_LOG) { - struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; + if (ctx->_Shader->Flags & GLSL_LOG) { + struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram; gl_shader_stage i; for (i = 0; i < MESA_SHADER_STAGES; i++) { diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index cad67aa8513..1d2ad604b5c 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -317,9 +317,9 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx ) { /* _NEW_PROGRAM */ const GLboolean vertexShader = - (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] && - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus && - ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]); + (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] && + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus && + ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]); const GLboolean vertexProgram = ctx->VertexProgram._Enabled; GLbitfield fp_inputs = 0x0; @@ -383,7 +383,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx ) * validation (see additional comments in state.c). */ if (vertexShader) - vprog = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]->Program; + vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]->Program; else vprog = &ctx->VertexProgram.Current->Base; diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 88cf202dfe4..cf133c7c9cf 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -873,6 +873,18 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_int = ctx->TransformFeedback.CurrentObject->Name; break; case GL_CURRENT_PROGRAM: + /* The Changelog of the ARB_separate_shader_objects spec says: + * + * 24 25 Jul 2011 pbrown Remove the language erroneously deleting + * CURRENT_PROGRAM. In the EXT extension, this + * token was aliased to ACTIVE_PROGRAM_EXT, and + * was used to indicate the last program set by + * either ActiveProgramEXT or UseProgram. In + * the ARB extension, the SSO active programs + * are now program pipeline object state and + * CURRENT_PROGRAM should still be used to query + * the last program set by UseProgram (bug 7822). + */ v->value_int = ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0; break; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index f0d345a143b..ada26233518 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -468,8 +468,8 @@ static GLuint get_handle(struct gl_context *ctx, GLenum pname) { if (pname == GL_PROGRAM_OBJECT_ARB) { - if (ctx->Shader.ActiveProgram) - return ctx->Shader.ActiveProgram->Name; + if (ctx->_Shader->ActiveProgram) + return ctx->_Shader->ActiveProgram->Name; else return 0; } @@ -840,7 +840,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) */ sh->CompileStatus = GL_FALSE; } else { - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { fprintf(stderr, "GLSL source for %s shader %d:\n", _mesa_shader_stage_to_string(sh->Stage), sh->Name); fprintf(stderr, "%s\n", sh->Source); @@ -852,11 +852,11 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) */ _mesa_glsl_compile_shader(ctx, sh, false, false); - if (ctx->Shader.Flags & GLSL_LOG) { + if (ctx->_Shader->Flags & GLSL_LOG) { _mesa_write_shader_to_file(sh); } - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { if (sh->CompileStatus) { fprintf(stderr, "GLSL IR for shader %d:\n", sh->Name); _mesa_print_ir(stderr, sh->ir, NULL); @@ -874,7 +874,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) } if (!sh->CompileStatus) { - if (ctx->Shader.Flags & GLSL_DUMP_ON_ERROR) { + if (ctx->_Shader->Flags & GLSL_DUMP_ON_ERROR) { fprintf(stderr, "GLSL source for %s shader %d:\n", _mesa_shader_stage_to_string(sh->Stage), sh->Name); fprintf(stderr, "%s\n", sh->Source); @@ -882,7 +882,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) fflush(stderr); } - if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) { + if (ctx->_Shader->Flags & GLSL_REPORT_ERRORS) { _mesa_debug(ctx, "Error compiling shader %u:\n%s\n", sh->Name, sh->InfoLog); } @@ -918,7 +918,7 @@ link_program(struct gl_context *ctx, GLuint program) _mesa_glsl_link_shader(ctx, shProg); if (shProg->LinkStatus == GL_FALSE && - (ctx->Shader.Flags & GLSL_REPORT_ERRORS)) { + (ctx->_Shader->Flags & GLSL_REPORT_ERRORS)) { _mesa_debug(ctx, "Error linking program %u:\n%s\n", shProg->Name, shProg->InfoLog); } @@ -994,7 +994,7 @@ use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program **target; gl_shader_stage stage = _mesa_shader_enum_to_shader_stage(type); - target = &ctx->Shader.CurrentProgram[stage]; + target = &ctx->_Shader->CurrentProgram[stage]; if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL)) shProg = NULL; @@ -1016,9 +1016,9 @@ use_shader_program(struct gl_context *ctx, GLenum type, /* Empty for now. */ break; case GL_FRAGMENT_SHADER: - if (*target == ctx->Shader._CurrentFragmentProgram) { + if (*target == ctx->_Shader->_CurrentFragmentProgram) { _mesa_reference_shader_program(ctx, - &ctx->Shader._CurrentFragmentProgram, + &ctx->_Shader->_CurrentFragmentProgram, NULL); } break; @@ -1536,7 +1536,7 @@ _mesa_UseProgram(GLhandleARB program) } /* debug code */ - if (ctx->Shader.Flags & GLSL_USE_PROG) { + if (ctx->_Shader->Flags & GLSL_USE_PROG) { print_shader_info(shProg); } } @@ -1862,9 +1862,9 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program) _mesa_use_shader_program(ctx, type, shProg); /* Nothing remains current */ - if (!ctx->Shader.CurrentVertexProgram && - !ctx->Shader.CurrentGeometryProgram && - !ctx->Shader.CurrentFragmentProgram && + if (!ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] && + !ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY] && + !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] && !ctx->Shader.ActiveProgram) { /* Unattach shader_state binding point */ @@ -1910,8 +1910,10 @@ _mesa_ActiveProgramEXT(GLuint program) _mesa_active_program(ctx, shProg, "glActiveProgramEXT"); /* Nothing remains current */ - if (!ctx->Shader.CurrentVertexProgram && !ctx->Shader.CurrentGeometryProgram && - !ctx->Shader.CurrentFragmentProgram && !ctx->Shader.ActiveProgram) { + if (!ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] && + !ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY] && + !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] && + !ctx->Shader.ActiveProgram) { /* Unattach shader_state binding point */ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, ctx->Pipeline.Default); 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 { diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 08725f60195..fcae878cf84 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -532,9 +532,9 @@ update_texture_state( struct gl_context *ctx ) int i; for (i = 0; i < MESA_SHADER_STAGES; i++) { - if (ctx->Shader.CurrentProgram[i] && - ctx->Shader.CurrentProgram[i]->LinkStatus) { - prog[i] = ctx->Shader.CurrentProgram[i]->_LinkedShaders[i]->Program; + if (ctx->_Shader->CurrentProgram[i] && + ctx->_Shader->CurrentProgram[i]->LinkStatus) { + prog[i] = ctx->_Shader->CurrentProgram[i]->_LinkedShaders[i]->Program; } else { if (i == MESA_SHADER_FRAGMENT && ctx->FragmentProgram._Enabled) prog[i] = &ctx->FragmentProgram.Current->Base; diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 6b9565ca389..abeb25e8734 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -388,8 +388,8 @@ get_xfb_source(struct gl_context *ctx) { int i; for (i = MESA_SHADER_GEOMETRY; i >= MESA_SHADER_VERTEX; i--) { - if (ctx->Shader.CurrentProgram[i] != NULL) - return ctx->Shader.CurrentProgram[i]; + if (ctx->_Shader->CurrentProgram[i] != NULL) + return ctx->_Shader->CurrentProgram[i]; } return NULL; } diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index fa13ef9fe2e..1f8d48dd92c 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -698,7 +698,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg, return; } - if (ctx->Shader.Flags & GLSL_UNIFORMS) { + if (ctx->_Shader->Flags & GLSL_UNIFORMS) { log_uniform(values, basicType, components, 1, count, false, shProg, location, uni); } @@ -920,7 +920,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, } } - if (ctx->Shader.Flags & GLSL_UNIFORMS) { + if (ctx->_Shader->Flags & GLSL_UNIFORMS) { log_uniform(values, GLSL_TYPE_FLOAT, components, vectors, count, bool(transpose), shProg, location, uni); } diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index e9b374b0da5..1daade42838 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -137,7 +137,7 @@ void GLAPIENTRY _mesa_Uniform1f(GLint location, GLfloat v0) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_FLOAT); } void GLAPIENTRY @@ -147,7 +147,7 @@ _mesa_Uniform2f(GLint location, GLfloat v0, GLfloat v1) GLfloat v[2]; v[0] = v0; v[1] = v1; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC2); } void GLAPIENTRY @@ -158,7 +158,7 @@ _mesa_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) v[0] = v0; v[1] = v1; v[2] = v2; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC3); } void GLAPIENTRY @@ -171,14 +171,14 @@ _mesa_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, v[1] = v1; v[2] = v2; v[3] = v3; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC4); } void GLAPIENTRY _mesa_Uniform1i(GLint location, GLint v0) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_INT); } void GLAPIENTRY @@ -188,7 +188,7 @@ _mesa_Uniform2i(GLint location, GLint v0, GLint v1) GLint v[2]; v[0] = v0; v[1] = v1; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC2); } void GLAPIENTRY @@ -199,7 +199,7 @@ _mesa_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2) v[0] = v0; v[1] = v1; v[2] = v2; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC3); } void GLAPIENTRY @@ -211,63 +211,63 @@ _mesa_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) v[1] = v1; v[2] = v2; v[3] = v3; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC4); } void GLAPIENTRY _mesa_Uniform1fv(GLint location, GLsizei count, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT); } void GLAPIENTRY _mesa_Uniform2fv(GLint location, GLsizei count, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC2); } void GLAPIENTRY _mesa_Uniform3fv(GLint location, GLsizei count, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC3); } void GLAPIENTRY _mesa_Uniform4fv(GLint location, GLsizei count, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC4); } void GLAPIENTRY _mesa_Uniform1iv(GLint location, GLsizei count, const GLint * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT); } void GLAPIENTRY _mesa_Uniform2iv(GLint location, GLsizei count, const GLint * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC2); } void GLAPIENTRY _mesa_Uniform3iv(GLint location, GLsizei count, const GLint * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC3); } void GLAPIENTRY _mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC4); } /** Same as above with direct state access **/ @@ -467,7 +467,7 @@ void GLAPIENTRY _mesa_Uniform1ui(GLint location, GLuint v0) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT); } void GLAPIENTRY @@ -477,7 +477,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1) GLuint v[2]; v[0] = v0; v[1] = v1; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2); } void GLAPIENTRY @@ -488,7 +488,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) v[0] = v0; v[1] = v1; v[2] = v2; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3); } void GLAPIENTRY @@ -500,35 +500,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) v[1] = v1; v[2] = v2; v[3] = v3; - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4); } void GLAPIENTRY _mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT); } void GLAPIENTRY _mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2); } void GLAPIENTRY _mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3); } void GLAPIENTRY _mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4); + _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4); } @@ -538,7 +538,7 @@ _mesa_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 2, 2, location, count, transpose, value); } @@ -547,7 +547,7 @@ _mesa_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 3, 3, location, count, transpose, value); } @@ -556,7 +556,7 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 4, 4, location, count, transpose, value); } @@ -703,7 +703,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 2, 3, location, count, transpose, value); } @@ -712,7 +712,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 3, 2, location, count, transpose, value); } @@ -721,7 +721,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 2, 4, location, count, transpose, value); } @@ -730,7 +730,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 4, 2, location, count, transpose, value); } @@ -739,7 +739,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 3, 4, location, count, transpose, value); } @@ -748,7 +748,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { GET_CURRENT_CONTEXT(ctx); - _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram, + _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram, 4, 3, location, count, transpose, value); } diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 9919874a668..95987107f38 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2917,7 +2917,7 @@ get_mesa_program(struct gl_context *ctx, set_branchtargets(&v, mesa_instructions, num_instructions); - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { fprintf(stderr, "\n"); fprintf(stderr, "GLSL IR for linked %s program %d:\n", target_string, shader_program->Name); @@ -2953,7 +2953,7 @@ get_mesa_program(struct gl_context *ctx, _mesa_reference_program(ctx, &shader->Program, prog); - if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) { + if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) { _mesa_optimize_program(ctx, prog); } @@ -3096,7 +3096,7 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) } } - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { if (!prog->LinkStatus) { fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name); } diff --git a/src/mesa/state_tracker/st_atom_clip.c b/src/mesa/state_tracker/st_atom_clip.c index 274b36a624e..f82c1332afc 100644 --- a/src/mesa/state_tracker/st_atom_clip.c +++ b/src/mesa/state_tracker/st_atom_clip.c @@ -52,7 +52,7 @@ static void update_clip( struct st_context *st ) /* if we have a vertex shader that writes clip vertex we need to pass the pre-projection transformed coordinates into the driver. */ if (st->vp) { - if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) use_eye = TRUE; } diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index a5013ed2c8b..7984bf742e3 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -219,7 +219,7 @@ static void st_bind_ubos(struct st_context *st, static void bind_vs_ubos(struct st_context *st) { struct gl_shader_program *prog = - st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; if (!prog) return; @@ -239,7 +239,7 @@ const struct st_tracked_state st_bind_vs_ubos = { static void bind_fs_ubos(struct st_context *st) { struct gl_shader_program *prog = - st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]; + st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT]; if (!prog) return; @@ -259,7 +259,7 @@ const struct st_tracked_state st_bind_fs_ubos = { static void bind_gs_ubos(struct st_context *st) { struct gl_shader_program *prog = - st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; + st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; if (!prog) return; diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 2b363615140..6119cc275f4 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1364,7 +1364,7 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, !ctx->Stencil.Enabled && !ctx->FragmentProgram.Enabled && !ctx->VertexProgram.Enabled && - !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] && + !ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] && ctx->DrawBuffer->_NumColorDrawBuffers == 1 && !ctx->Query.CondRenderQuery && !ctx->Query.CurrentOcclusionObject) { diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index dba5870a085..c8189faade5 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -131,7 +131,7 @@ setup_index_buffer(struct st_context *st, static void check_uniforms(struct gl_context *ctx) { - struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; + struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram; unsigned j; for (j = 0; j < 3; j++) { diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a9e75d8a641..f019a55c216 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5198,7 +5198,7 @@ get_mesa_program(struct gl_context *ctx, /* Write the END instruction. */ v->emit(NULL, TGSI_OPCODE_END); - if (ctx->Shader.Flags & GLSL_DUMP) { + if (ctx->_Shader->Flags & GLSL_DUMP) { printf("\n"); printf("GLSL IR for linked %s program %d:\n", _mesa_shader_stage_to_string(shader->Stage), diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 692a57008f3..2f0ec32f554 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1204,7 +1204,7 @@ st_get_gp_variant(struct st_context *st, void st_print_shaders(struct gl_context *ctx) { - struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; + struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram; unsigned j; for (j = 0; j < 3; j++) { diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index fa45fa97ade..21699f3ea68 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -182,7 +182,7 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine, machine->Samplers = program->Base.SamplerUnits; /* if running a GLSL program (not ARB_fragment_program) */ - if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]) { + if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT]) { /* Store front/back facing value */ machine->Attribs[VARYING_SLOT_FACE][col][0] = 1.0F - span->facing; } |