diff options
author | Eric Anholt <eric@anholt.net> | 2010-09-02 09:37:17 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-09-07 10:34:09 -0700 |
commit | b157113e7333e9dad1c994902e10faedc45bd5e7 (patch) | |
tree | 1fada02da0b4f9951c5f335b420d4a819e05ef92 | |
parent | 5c777928591279886e015c10f640828f77b97559 (diff) |
i965: When using the new FS backend, don't validate the Mesa IR version.
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index bc152204a4..3e52be5d4b 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -132,6 +132,7 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx, struct brw_fragment_program *newFP = brw_fragment_program(fprog); const struct brw_fragment_program *curFP = brw_fragment_program_const(brw->fragment_program); + struct gl_shader_program *shader_program; if (fprog->FogOption) { _mesa_append_fog_code(ctx, fprog); @@ -142,6 +143,21 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx, brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM; newFP->id = brw->program_id++; newFP->isGLSL = brw_wm_is_glsl(fprog); + + /* Don't reject fragment shaders for their Mesa IR state when we're + * using the new FS backend. + */ + shader_program = _mesa_lookup_shader_program(ctx, prog->Id); + if (shader_program) { + for (i = 0; i < shader_program->_NumLinkedShaders; i++) { + struct brw_shader *shader; + + shader = (struct brw_shader *)shader_program->_LinkedShaders[i]; + if (shader->base.Type == GL_FRAGMENT_SHADER && shader->ir) { + return GL_TRUE; + } + } + } } else if (target == GL_VERTEX_PROGRAM_ARB) { struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog; |