From: Maciej Cencora Date: Sat, 18 Apr 2009 01:44:36 +0000 (+0200) Subject: r300: further r300/r500 merge preparation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=97104c255942ee781777818633ca6c17b4fea312;p=mesa.git r300: further r300/r500 merge preparation --- diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index ff59ae7ecf4..41417f3122f 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 eae4c46f694..d58b0921224 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 493c4be6a00..95380a2870e 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 526a0ea928f..3e21e0f4975 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;