[Mesa-dev] [PATCH 9/9] i965: Use the fixed function GLSL program instead of the ARB program.
Eric Anholt
eric at anholt.net
Wed Jan 12 14:04:59 PST 2011
This gets one more piece of the pipeline onto the new codegen backend.
Once ARB_fragment_program can generate GLSL programs, we can nuke the
old backend.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 6 +++---
src/mesa/drivers/dri/i965/brw_wm_state.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d2947ee..0357451 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1342,7 +1342,7 @@ fs_visitor::visit(ir_texture *ir)
assert(!ir->projector);
sampler = _mesa_get_sampler_uniform_value(ir->sampler,
- ctx->Shader.CurrentFragmentProgram,
+ ctx->Shader._CurrentFragmentProgram,
&brw->fragment_program->Base);
sampler = c->fp->program.Base.SamplerUnits[sampler];
@@ -3354,7 +3354,7 @@ fs_visitor::generate_code()
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("Native code for fragment shader %d:\n",
- ctx->Shader.CurrentFragmentProgram->Name);
+ ctx->Shader._CurrentFragmentProgram->Name);
}
if_depth_in_loop[loop_stack_depth] = 0;
@@ -3610,7 +3610,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
- struct gl_shader_program *prog = ctx->Shader.CurrentFragmentProgram;
+ struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
if (!prog)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index e9ef635..24a317a 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -135,9 +135,9 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
/* If using the fragment shader backend, the program is always
* 8-wide.
*/
- if (ctx->Shader.CurrentFragmentProgram) {
+ if (ctx->Shader._CurrentFragmentProgram) {
struct brw_shader *shader = (struct brw_shader *)
- ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ ctx->Shader._CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
if (shader != NULL && shader->ir != NULL) {
key->is_glsl = GL_TRUE;
--
1.7.2.3
More information about the mesa-dev
mailing list