diff options
author | Ian Romanick <[email protected]> | 2011-08-20 15:00:36 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-10-07 16:39:50 -0700 |
commit | de772c402215b956ab3aa0875330fc1bf7cdf95b (patch) | |
tree | 218fb8b814d144ceccb08a0f7ebe6640fa8bf675 /src/mesa/drivers | |
parent | 39348bf79fb247eec895c93e52f23afe138be46a (diff) |
mesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgram
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index e073eaaec2d..6d17839df95 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1828,12 +1828,14 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog) { struct brw_context *brw = brw_context(ctx); struct brw_wm_prog_key key; - struct gl_fragment_program *fp = prog->FragmentProgram; - struct brw_fragment_program *bfp = brw_fragment_program(fp); - if (!fp) + if (!prog->_LinkedShaders[MESA_SHADER_FRAGMENT]) return true; + struct gl_fragment_program *fp = (struct gl_fragment_program *) + prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; + struct brw_fragment_program *bfp = brw_fragment_program(fp); + memset(&key, 0, sizeof(key)); if (fp->UsesKill) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 56181a37c9f..4035186af00 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -347,7 +347,8 @@ public: this->c = c; this->p = &c->func; this->brw = p->brw; - this->fp = prog->FragmentProgram; + this->fp = (struct gl_fragment_program *) + prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; this->prog = prog; this->intel = &brw->intel; this->ctx = &intel->ctx; diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index fdb2d15c609..f6af7815bb7 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -224,7 +224,7 @@ bool do_wm_prog(struct brw_context *brw, brw_init_compile(brw, &c->func, c); - if (prog && prog->FragmentProgram) { + if (prog && prog->_LinkedShaders[MESA_SHADER_FRAGMENT]) { if (!brw_wm_fs_emit(brw, c, prog)) return false; } else { |