Mesa (mesa_7_7_branch): tgsi: fix detection of front-facing attribute
Brian Paul
brianp at kemper.freedesktop.org
Fri Jan 15 21:58:26 UTC 2010
Module: Mesa
Branch: mesa_7_7_branch
Commit: f595e72337f4cdc2ec6b0378f747e31666e70d5c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f595e72337f4cdc2ec6b0378f747e31666e70d5c
Author: Brian Paul <brianp at vmware.com>
Date: Fri Jan 15 14:57:55 2010 -0700
tgsi: fix detection of front-facing attribute
This code was not updated when we added TGSI_SEMANTIC_FACE a while ago.
---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index f9c16f1..a4414d1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -101,12 +101,10 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
if (src->SrcRegister.File == TGSI_FILE_INPUT) {
const int ind = src->SrcRegister.Index;
if (info->input_semantic_name[ind] == TGSI_SEMANTIC_FOG) {
- if (src->SrcRegister.SwizzleX == TGSI_SWIZZLE_X) {
- info->uses_fogcoord = TRUE;
- }
- else if (src->SrcRegister.SwizzleX == TGSI_SWIZZLE_Y) {
- info->uses_frontfacing = TRUE;
- }
+ info->uses_fogcoord = TRUE;
+ }
+ else if (info->input_semantic_name[ind] == TGSI_SEMANTIC_FACE) {
+ info->uses_frontfacing = TRUE;
}
}
}
More information about the mesa-commit
mailing list