summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-02-15 13:39:24 +0000
committerKeith Whitwell <[email protected]>2008-02-15 13:39:24 +0000
commitc179bc990108a8ea691ceab03fd68a12396ab538 (patch)
tree470b4aa01233d548ce6e30d9c88a0ce73b6f1b53 /src/gallium/auxiliary
parentb29d8d27292c2ad956d3f0a307603f00ee01af28 (diff)
tgsi: pass through failure to sse-codegenerate for fragment programs too.
In particular, will fallback to interpreted execution for shaders with TEX instructions.
Diffstat (limited to 'src/gallium/auxiliary')
-rwxr-xr-xsrc/gallium/auxiliary/tgsi/exec/tgsi_sse2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
index 79209575bc4..62c6a69c63f 100755
--- a/src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
@@ -2308,6 +2308,7 @@ tgsi_emit_sse2_fs(
{
struct tgsi_parse_context parse;
boolean instruction_phase = FALSE;
+ unsigned ok = 1;
DUMP_START();
@@ -2333,7 +2334,7 @@ tgsi_emit_sse2_fs(
tgsi_parse_init( &parse, tokens );
- while( !tgsi_parse_end_of_tokens( &parse ) ) {
+ while( !tgsi_parse_end_of_tokens( &parse ) && ok ) {
tgsi_parse_token( &parse );
switch( parse.FullToken.Token.Type ) {
@@ -2352,17 +2353,18 @@ tgsi_emit_sse2_fs(
get_output_base(),
get_argument( 1 ) );
}
- emit_instruction(
+ ok = emit_instruction(
func,
&parse.FullToken.FullInstruction );
break;
case TGSI_TOKEN_TYPE_IMMEDIATE:
/* XXX implement this */
- assert(0);
+ ok = 0;
break;
default:
+ ok = 0;
assert( 0 );
}
}
@@ -2371,7 +2373,7 @@ tgsi_emit_sse2_fs(
DUMP_END();
- return 1;
+ return ok;
}
#endif /* i386 */