aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
commitb7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch)
tree1dbf32344313ad7e5884e6686251cad398a231fa /mesalib/src/mesa/main/shaderapi.c
parent7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff)
parent1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff)
downloadvcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa xkeyboard-config xserver git update 15 jan 2014 randrproto libfontenc mesa xserver git update 10 Jan 2014 randsrproto fontconfig libX11 git update 6 Jan 2014 Conflicts: mesalib/src/glsl/builtin_functions.cpp mesalib/src/glsl/ir_builder.h xorg-server/Xext/xres.c xorg-server/dix/dispatch.c xorg-server/dix/dixfonts.c xorg-server/hw/xwin/wingc.c xorg-server/hw/xwin/winwindowswm.c xorg-server/include/gc.h xorg-server/os/access.c
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r--mesalib/src/mesa/main/shaderapi.c18
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)
{