mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-05 23:20:39 +02:00
gallium: store edgflag info in tgsi_shader_info
provides easier access for drivers which may base fallback decision on this
This commit is contained in:
parent
9d938e29f2
commit
ff5b0c72db
2 changed files with 12 additions and 7 deletions
|
|
@ -138,15 +138,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++;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* special case */
|
||||
if (procType == TGSI_PROCESSOR_FRAGMENT &&
|
||||
file == TGSI_FILE_OUTPUT &&
|
||||
fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) {
|
||||
info->writes_z = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,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? */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue