return true;
}
+static void
+i915SamplerUniformChange(struct gl_context *ctx,
+ GLenum target, struct gl_program *prog)
+{
+ i915ProgramStringNotify(ctx, target, prog);
+}
+
void
i915_update_program(struct gl_context *ctx)
{
functions->DeleteProgram = i915DeleteProgram;
functions->IsProgramNative = i915IsProgramNative;
functions->ProgramStringNotify = i915ProgramStringNotify;
+ functions->SamplerUniformChange = i915SamplerUniformChange;
}
GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
struct gl_program *prog);
+ /**
+ * Notify driver that the sampler uniforms for the current program have
+ * changed. On some drivers, this may require shader recompiles.
+ */
+ void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
+ struct gl_program *prog);
+
/** Query if program can be loaded onto hardware */
GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
struct gl_program *prog);
_mesa_associate_uniform_storage(ctx, p.shader_program, fp->Parameters);
_mesa_update_shader_textures_used(p.shader_program, fp);
- (void) ctx->Driver.ProgramStringNotify(ctx, fp->Target, fp);
+ if (ctx->Driver.SamplerUniformChange)
+ ctx->Driver.SamplerUniformChange(ctx, fp->Target, fp);
if (!p.shader_program->LinkStatus)
_mesa_problem(ctx, "Failed to link fixed function fragment shader: %s\n",
sizeof(shProg->SamplerUnits));
_mesa_update_shader_textures_used(shProg, prog);
- (void) ctx->Driver.ProgramStringNotify(ctx, prog->Target, prog);
+ if (ctx->Driver.SamplerUniformChange)
+ ctx->Driver.SamplerUniformChange(ctx, prog->Target, prog);
}
}
}