summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h3
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c2
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index ff59ae7ecf..41417f3122 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -614,7 +614,8 @@ struct r300_swtcl_info {
struct r300_vtable {
void (* SetupRSUnit)(GLcontext *ctx);
void (* SetupFragmentShaderTextures)(GLcontext *ctx, int *tmu_mappings);
- void ( *TranslateFragmentShader)(GLcontext *ctx, struct gl_fragment_program *fp);
+ void (* TranslateFragmentShader)(GLcontext *ctx, struct gl_fragment_program *fp);
+ GLboolean (* FragmentProgramEmit)(struct r300_fragment_program_compiler *compiler);
GLboolean (* SetupPixelShader)(GLcontext *ctx);
};
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index eae4c46f69..d58b092122 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -452,7 +452,7 @@ void r300TranslateFragmentShader(GLcontext *ctx, struct gl_fragment_program *fp)
_mesa_print_program(compiler.program);
}
- if (!r300FragmentProgramEmit(&compiler))
+ if (!r300->vtbl.FragmentProgramEmit(&compiler))
r300_fp->error = GL_TRUE;
/* Subtle: Rescue any parameters that have been added during transformations */
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 493c4be6a0..95380a2870 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -2583,10 +2583,12 @@ void r300InitShaderFunctions(r300ContextPtr r300)
r300->vtbl.SetupPixelShader = r500SetupPixelShader;
r300->vtbl.SetupFragmentShaderTextures = r500SetupFragmentShaderTextures;
r300->vtbl.TranslateFragmentShader = r500TranslateFragmentShader;
+ r300->vtbl.FragmentProgramEmit = r500FragmentProgramEmit;
} else {
r300->vtbl.SetupRSUnit = r300SetupRSUnit;
r300->vtbl.SetupPixelShader = r300SetupPixelShader;
r300->vtbl.SetupFragmentShaderTextures = r300SetupFragmentShaderTextures;
r300->vtbl.TranslateFragmentShader = r300TranslateFragmentShader;
+ r300->vtbl.FragmentProgramEmit = r300FragmentProgramEmit;
}
}
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 526a0ea928..3e21e0f497 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -491,7 +491,7 @@ void r500TranslateFragmentShader(GLcontext *ctx, struct gl_fragment_program *fp)
_mesa_print_program(compiler.program);
}
- if (!r500FragmentProgramEmit(&compiler))
+ if (!r300->vtbl.FragmentProgramEmit(&compiler))
r300_fp->error = GL_TRUE;
r300_fp->translated = GL_TRUE;