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);
};
_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 */
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;
}
}
_mesa_print_program(compiler.program);
}
- if (!r500FragmentProgramEmit(&compiler))
+ if (!r300->vtbl.FragmentProgramEmit(&compiler))
r300_fp->error = GL_TRUE;
r300_fp->translated = GL_TRUE;