diff options
author | Roland Scheidegger <[email protected]> | 2009-12-22 20:54:26 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2009-12-22 20:54:26 +0100 |
commit | 35e8283c69d80debb44b05ea79dc5f67303a7432 (patch) | |
tree | aacfe7f201094793c3d29ec0ddcc71cb01f7476c /src/gallium/auxiliary/tgsi | |
parent | 00b463fc30b30911797c5d5eaaeae79b7a36589b (diff) | |
parent | 420ff89067515a74c9625a103cadc267d5f64bd4 (diff) |
Merge branch 'gallium-edgeflags'
Conflicts:
src/mesa/state_tracker/st_draw.c
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 18 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index ba1357697d1..5e7e5d2ff9c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -121,7 +121,8 @@ static const char *semantic_names[] = "PSIZE", "GENERIC", "NORMAL", - "FACE" + "FACE", + "EDGEFLAG" }; static const char *immediate_type_names[] = diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 5f5c95bfbdb..0f48b0dc3a1 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -139,15 +139,19 @@ tgsi_scan_shader(const struct tgsi_token *tokens, info->output_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name; info->output_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index; info->num_outputs++; - } - /* special case */ - if (procType == TGSI_PROCESSOR_FRAGMENT && - file == TGSI_FILE_OUTPUT && - fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) { - info->writes_z = TRUE; + /* extra info for special outputs */ + if (procType == TGSI_PROCESSOR_FRAGMENT && + fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) { + info->writes_z = TRUE; + } + if (procType == TGSI_PROCESSOR_VERTEX && + fulldecl->Semantic.Name == TGSI_SEMANTIC_EDGEFLAG) { + info->writes_edgeflag = TRUE; + } } - } + + } } break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index a1e8a4f6bb7..dae5376c24a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -57,6 +57,7 @@ struct tgsi_shader_info uint opcode_count[TGSI_OPCODE_LAST]; /**< opcode histogram */ boolean writes_z; /**< does fragment shader write Z value? */ + boolean writes_edgeflag; /**< vertex shader outputs edgeflag */ boolean uses_kill; /**< KIL or KILP instruction used? */ boolean uses_fogcoord; /**< fragment shader uses fog coord? */ boolean uses_frontfacing; /**< fragment shader uses front/back-face flag? */ |