diff options
-rw-r--r-- | src/gallium/drivers/r300/r300_fs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 2b9861cae38..485faefc6ac 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -424,14 +424,6 @@ static void r300_translate_fragment_shader( /* 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); @@ -447,6 +439,14 @@ static void r300_translate_fragment_shader( 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; |