mesa: TGSI translation of multiple render targets.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 15 Apr 2009 19:07:48 +0000 (20:07 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 15 Apr 2009 19:08:33 +0000 (20:08 +0100)
src/mesa/state_tracker/st_program.c

index 6348e83d8ae51f2cae8c6af452a63b3e1e9b7d7b..2795570cf10b2d08a3c0cb456a68c1731dea6812 100644 (file)
@@ -484,14 +484,14 @@ st_translate_fragment_program(struct st_context *st,
                /* handled above */
                assert(0);
                break;
-            case FRAG_RESULT_COLOR:
+            default:
+               assert(attr == FRAG_RESULT_COLOR ||
+                      (FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
                fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
                fs_output_semantic_index[fs_num_outputs] = numColors;
                outputMapping[attr] = fs_num_outputs;
                numColors++;
                break;
-            default:
-               assert(0);
             }
 
             output_flags[fs_num_outputs] = stfp->Base.Base.OutputFlags[attr];