diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_tgsi_to_rc.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_tgsi_to_rc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index 941ec17016..aff4ddd4e2 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -29,6 +29,7 @@ #include "tgsi/tgsi_scan.h" #include "tgsi/tgsi_util.h" +#include "util/u_debug.h" static unsigned translate_opcode(unsigned opcode) { @@ -144,7 +145,7 @@ static unsigned translate_opcode(unsigned opcode) case TGSI_OPCODE_KIL: return RC_OPCODE_KIL; } - fprintf(stderr, "Unknown opcode: %i\n", opcode); + debug_printf("r300: Unknown TGSI/RC opcode: %i\n", opcode); return RC_OPCODE_ILLEGAL_OPCODE; } @@ -306,7 +307,7 @@ static void handle_immediate(struct tgsi_to_rc * ttr, for (i = 0; i < 4; i++) { if (imm->u[i].Float == 0.0f) { swizzle |= RC_SWIZZLE_ZERO << (i * 3); - } else if (imm->u[i].Float == 0.5f) { + } else if (imm->u[i].Float == 0.5f && ttr->use_half_swizzles) { swizzle |= RC_SWIZZLE_HALF << (i * 3); } else if (imm->u[i].Float == 1.0f) { swizzle |= RC_SWIZZLE_ONE << (i * 3); @@ -329,7 +330,8 @@ static void handle_immediate(struct tgsi_to_rc * ttr, } } -void r300_tgsi_to_rc(struct tgsi_to_rc * ttr, const struct tgsi_token * tokens) +void r300_tgsi_to_rc(struct tgsi_to_rc * ttr, + const struct tgsi_token * tokens) { struct tgsi_parse_context parser; unsigned imm_index = 0; |