/* Invoke the compiler */
r3xx_compile_fragment_program(&compiler);
- /* Shaders with zero instructions are invalid,
- * use the dummy shader instead. */
- if (shader->code.code.r500.inst_end == -1) {
- rc_destroy(&compiler.Base);
- r300_dummy_fragment_shader(r300, shader);
- return;
- }
-
if (compiler.Base.Error) {
fprintf(stderr, "r300 FP: Compiler Error:\n%sUsing a dummy shader"
" instead.\n", compiler.Base.ErrorMsg);
return;
}
+ /* Shaders with zero instructions are invalid,
+ * use the dummy shader instead. */
+ if (shader->code.code.r500.inst_end == -1) {
+ rc_destroy(&compiler.Base);
+ r300_dummy_fragment_shader(r300, shader);
+ return;
+ }
+
/* Initialize numbers of constants for each type. */
shader->externals_count = 0;
for (i = 0;