diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/api_validate.c | 10 | ||||
-rw-r--r-- | src/mesa/main/context.c | 6 | ||||
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp | 8 | ||||
-rw-r--r-- | src/mesa/main/get.c | 12 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 36 | ||||
-rw-r--r-- | src/mesa/main/state.c | 14 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 6 | ||||
-rw-r--r-- | src/mesa/main/transformfeedback.c | 4 | ||||
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 4 | ||||
-rw-r--r-- | src/mesa/main/uniforms.c | 66 |
10 files changed, 90 insertions, 76 deletions
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); } |