diff options
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r-- | mesalib/src/mesa/main/shaderapi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 57511e83e..6042fa896 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -108,7 +108,7 @@ _mesa_init_shader_state(struct gl_context *ctx) * are generated by the GLSL compiler. */ struct gl_shader_compiler_options options; - gl_shader_type sh; + gl_shader_stage sh; memset(&options, 0, sizeof(options)); options.MaxUnrollIterations = 32; @@ -117,7 +117,7 @@ _mesa_init_shader_state(struct gl_context *ctx) /* Default pragma settings */ options.DefaultPragmas.Optimize = GL_TRUE; - for (sh = 0; sh < MESA_SHADER_TYPES; ++sh) + for (sh = 0; sh < MESA_SHADER_STAGES; ++sh) memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options)); ctx->Shader.Flags = get_shader_flags(); @@ -778,7 +778,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) if (!sh) return; - options = &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(sh->Type)]; + options = &ctx->ShaderCompilerOptions[sh->Stage]; /* set default pragma state for shader */ sh->Pragmas = options->DefaultPragmas; @@ -791,7 +791,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) } else { if (ctx->Shader.Flags & GLSL_DUMP) { printf("GLSL source for %s shader %d:\n", - _mesa_shader_enum_to_string(sh->Type), sh->Name); + _mesa_shader_stage_to_string(sh->Stage), sh->Name); printf("%s\n", sh->Source); } @@ -823,7 +823,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) if (!sh->CompileStatus) { if (ctx->Shader.Flags & GLSL_DUMP_ON_ERROR) { fprintf(stderr, "GLSL source for %s shader %d:\n", - _mesa_shader_enum_to_string(sh->Type), sh->Name); + _mesa_shader_stage_to_string(sh->Stage), sh->Name); fprintf(stderr, "%s\n", sh->Source); fprintf(stderr, "Info Log:\n%s\n", sh->InfoLog); fflush(stderr); @@ -898,7 +898,7 @@ print_shader_info(const struct gl_shader_program *shProg) printf("Mesa: glUseProgram(%u)\n", shProg->Name); for (i = 0; i < shProg->NumShaders; i++) { printf(" %s shader %u, checksum %u\n", - _mesa_shader_enum_to_string(shProg->Shaders[i]->Type), + _mesa_shader_stage_to_string(shProg->Shaders[i]->Stage), shProg->Shaders[i]->Name, shProg->Shaders[i]->SourceChecksum); } @@ -1533,10 +1533,10 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, switch (shadertype) { case GL_VERTEX_SHADER: - limits = &ctx->Const.VertexProgram; + limits = &ctx->Const.Program[MESA_SHADER_VERTEX]; break; case GL_FRAGMENT_SHADER: - limits = &ctx->Const.FragmentProgram; + limits = &ctx->Const.Program[MESA_SHADER_FRAGMENT]; break; default: _mesa_error(ctx, GL_INVALID_ENUM, @@ -1836,7 +1836,7 @@ _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string) * object to a specific gl_program object. */ void -_mesa_copy_linked_program_data(gl_shader_type type, +_mesa_copy_linked_program_data(gl_shader_stage type, const struct gl_shader_program *src, struct gl_program *dst) { |