if (p->state->unit[unit].shadow) {
texcoord = texcoord->clone(p->mem_ctx, NULL);
- tex->shadow_comparitor = new(p->mem_ctx) ir_swizzle(texcoord,
+ tex->shadow_comparator = new(p->mem_ctx) ir_swizzle(texcoord,
coords, 0, 0, 0,
1);
coords++;
p.mem_ctx = ralloc_context(NULL);
p.shader = _mesa_new_shader(0, MESA_SHADER_FRAGMENT);
+#ifdef DEBUG
+ p.shader->SourceChecksum = 0xf18ed; /* fixed */
+#endif
p.shader->ir = new(p.shader) exec_list;
state = new(p.shader) _mesa_glsl_parse_state(ctx, MESA_SHADER_FRAGMENT,
p.shader);
const struct gl_shader_compiler_options *options =
&ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
- while (do_common_optimization(p.shader->ir, false, false, options,
- ctx->Const.NativeIntegers))
- ;
+ /* Conservative approach: Don't optimize here, the linker does it too. */
+ if (!ctx->Const.GLSLOptimizeConservatively) {
+ while (do_common_optimization(p.shader->ir, false, false, options,
+ ctx->Const.NativeIntegers))
+ ;
+ }
+
reparent_ir(p.shader->ir, p.shader->ir);
p.shader->CompileStatus = true;