diff options
author | marha <marha@users.sourceforge.net> | 2012-09-17 16:16:11 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-17 16:16:11 +0200 |
commit | c72f683c50e774b21967f0121245a286539fa555 (patch) | |
tree | fa5e86f04a33b8bcebf937d1966052ccf1fefbeb /mesalib/src/mesa/program | |
parent | 86fb7e4a298199b30bd16565569a9b3dfe7a1f11 (diff) | |
parent | e3c4aa34268f99562e66b43a7d9efcd16ca072e6 (diff) | |
download | vcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.gz vcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.bz2 vcxsrv-c72f683c50e774b21967f0121245a286539fa555.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/syncobj.h
pixman/pixman/pixman-mmx.c
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/program/prog_noise.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/program/program.c | 30 | ||||
-rw-r--r-- | mesalib/src/mesa/program/program_lexer.l | 1 |
4 files changed, 8 insertions, 33 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index d675da269..4991a551c 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -325,11 +325,11 @@ public: void *mem_ctx; }; -src_reg undef_src = src_reg(PROGRAM_UNDEFINED, 0, NULL); +static src_reg undef_src = src_reg(PROGRAM_UNDEFINED, 0, NULL); -dst_reg undef_dst = dst_reg(PROGRAM_UNDEFINED, SWIZZLE_NOOP); +static dst_reg undef_dst = dst_reg(PROGRAM_UNDEFINED, SWIZZLE_NOOP); -dst_reg address_reg = dst_reg(PROGRAM_ADDRESS, WRITEMASK_X); +static dst_reg address_reg = dst_reg(PROGRAM_ADDRESS, WRITEMASK_X); static int swizzle_for_size(int size) @@ -3060,7 +3060,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader) return; } - state->error = preprocess(state, &source, &state->info_log, + state->error = glcpp_preprocess(state, &source, &state->info_log, &ctx->Extensions, ctx->API); if (ctx->Shader.Flags & GLSL_DUMP) { diff --git a/mesalib/src/mesa/program/prog_noise.c b/mesalib/src/mesa/program/prog_noise.c index 1713ddb5f..75cd8c659 100644 --- a/mesalib/src/mesa/program/prog_noise.c +++ b/mesalib/src/mesa/program/prog_noise.c @@ -76,7 +76,7 @@ * A vector-valued noise over 3D accesses it 96 times, and a * float-valued 4D noise 64 times. We want this to fit in the cache! */ -unsigned char perm[512] = { 151, 160, 137, 91, 90, 15, +static const unsigned char perm[512] = { 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c index becb77c1d..30f83772f 100644 --- a/mesalib/src/mesa/program/program.c +++ b/mesalib/src/mesa/program/program.c @@ -83,14 +83,9 @@ _mesa_init_program(struct gl_context *ctx) ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup(""); -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program ctx->VertexProgram.Enabled = GL_FALSE; -#if FEATURE_es2_glsl ctx->VertexProgram.PointSizeEnabled = (ctx->API == API_OPENGLES2) ? GL_TRUE : GL_FALSE; -#else - ctx->VertexProgram.PointSizeEnabled = GL_FALSE; -#endif ctx->VertexProgram.TwoSideEnabled = GL_FALSE; _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, ctx->Shared->DefaultVertexProgram); @@ -100,31 +95,24 @@ _mesa_init_program(struct gl_context *ctx) ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV; } ctx->VertexProgram.Cache = _mesa_new_program_cache(); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program ctx->FragmentProgram.Enabled = GL_FALSE; _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, ctx->Shared->DefaultFragmentProgram); assert(ctx->FragmentProgram.Current); ctx->FragmentProgram.Cache = _mesa_new_program_cache(); -#endif -#if FEATURE_ARB_geometry_shader4 ctx->GeometryProgram.Enabled = GL_FALSE; /* right now by default we don't have a geometry program */ _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL); ctx->GeometryProgram.Cache = _mesa_new_program_cache(); -#endif /* XXX probably move this stuff */ -#if FEATURE_ATI_fragment_shader ctx->ATIFragmentShader.Enabled = GL_FALSE; ctx->ATIFragmentShader.Current = ctx->Shared->DefaultFragmentShader; assert(ctx->ATIFragmentShader.Current); ctx->ATIFragmentShader.Current->RefCount++; -#endif } @@ -134,27 +122,21 @@ _mesa_init_program(struct gl_context *ctx) void _mesa_free_program_data(struct gl_context *ctx) { -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL); _mesa_delete_program_cache(ctx, ctx->VertexProgram.Cache); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL); _mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache); -#endif -#if FEATURE_ARB_geometry_shader4 _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL); _mesa_delete_program_cache(ctx, ctx->GeometryProgram.Cache); -#endif + /* XXX probably move this stuff */ -#if FEATURE_ATI_fragment_shader if (ctx->ATIFragmentShader.Current) { ctx->ATIFragmentShader.Current->RefCount--; if (ctx->ATIFragmentShader.Current->RefCount <= 0) { free(ctx->ATIFragmentShader.Current); } } -#endif + free((void *) ctx->Program.ErrorString); } @@ -167,25 +149,18 @@ _mesa_free_program_data(struct gl_context *ctx) void _mesa_update_default_objects_program(struct gl_context *ctx) { -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, ctx->Shared->DefaultVertexProgram); assert(ctx->VertexProgram.Current); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, ctx->Shared->DefaultFragmentProgram); assert(ctx->FragmentProgram.Current); -#endif -#if FEATURE_ARB_geometry_shader4 _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, ctx->Shared->DefaultGeometryProgram); -#endif /* XXX probably move this stuff */ -#if FEATURE_ATI_fragment_shader if (ctx->ATIFragmentShader.Current) { ctx->ATIFragmentShader.Current->RefCount--; if (ctx->ATIFragmentShader.Current->RefCount <= 0) { @@ -195,7 +170,6 @@ _mesa_update_default_objects_program(struct gl_context *ctx) ctx->ATIFragmentShader.Current = (struct ati_fragment_shader *) ctx->Shared->DefaultFragmentShader; assert(ctx->ATIFragmentShader.Current); ctx->ATIFragmentShader.Current->RefCount++; -#endif } diff --git a/mesalib/src/mesa/program/program_lexer.l b/mesalib/src/mesa/program/program_lexer.l index 0a50dab97..0947bb046 100644 --- a/mesalib/src/mesa/program/program_lexer.l +++ b/mesalib/src/mesa/program/program_lexer.l @@ -165,6 +165,7 @@ szf [HR]? cc C? sat (_SAT)? +%option prefix="_mesa_program_" %option bison-bridge bison-locations reentrant noyywrap %% |