mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
pan/bi: Set clause type for gl_FragCoord.z
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>
This commit is contained in:
parent
47c84ee735
commit
ef9b4b3a0b
1 changed files with 12 additions and 0 deletions
|
|
@ -28,6 +28,15 @@
|
|||
|
||||
/* Finds the clause type required or return none */
|
||||
|
||||
static bool
|
||||
bi_is_fragz(bi_instruction *ins)
|
||||
{
|
||||
if (!(ins->src[0] & BIR_INDEX_CONSTANT))
|
||||
return false;
|
||||
|
||||
return (ins->constant.u32 == BIFROST_FRAGZ);
|
||||
}
|
||||
|
||||
static enum bifrost_clause_type
|
||||
bi_clause_type_for_ins(bi_instruction *ins)
|
||||
{
|
||||
|
|
@ -43,6 +52,9 @@ bi_clause_type_for_ins(bi_instruction *ins)
|
|||
return BIFROST_CLAUSE_NONE;
|
||||
|
||||
case BI_LOAD_VAR:
|
||||
if (bi_is_fragz(ins))
|
||||
return BIFROST_CLAUSE_FRAGZ;
|
||||
|
||||
return BIFROST_CLAUSE_LOAD_VARY;
|
||||
|
||||
case BI_LOAD_UNIFORM:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue