mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 11:40:39 +02:00
nir/gather_tcs_info: use nir_analyze_fp_class directly
The information around positive one helps in theory. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39987>
This commit is contained in:
parent
08cac48170
commit
58799c4e7c
1 changed files with 7 additions and 18 deletions
|
|
@ -458,29 +458,18 @@ nir_gather_tcs_info(const nir_shader *nir, nir_tcs_info *info,
|
|||
continue;
|
||||
}
|
||||
|
||||
const struct fp_result_range r =
|
||||
nir_analyze_fp_range(&range_ht, scalar.def);
|
||||
fp_class_mask fp_class =
|
||||
nir_analyze_fp_class(&range_ht, scalar.def);
|
||||
|
||||
switch (r.range) {
|
||||
case unknown:
|
||||
case ge_zero:
|
||||
case ne_zero:
|
||||
default:
|
||||
if (fp_class & (FP_CLASS_ANY_NEG | FP_CLASS_ANY_ZERO | FP_CLASS_NAN))
|
||||
tess_level_writes_le_zero |= BITFIELD_BIT(shift);
|
||||
|
||||
if (fp_class & (FP_CLASS_GT_ZERO_LT_POS_ONE | FP_CLASS_POS_ONE))
|
||||
tess_level_writes_le_one |= BITFIELD_BIT(shift);
|
||||
|
||||
if (fp_class & (FP_CLASS_GT_POS_ONE | FP_CLASS_POS_INF)) {
|
||||
tess_level_writes_le_two |= BITFIELD_BIT(shift);
|
||||
tess_level_writes_gt_two |= BITFIELD_BIT(shift);
|
||||
break;
|
||||
case lt_zero:
|
||||
case le_zero:
|
||||
case eq_zero:
|
||||
tess_level_writes_le_zero |= BITFIELD_BIT(shift);
|
||||
break;
|
||||
case gt_zero:
|
||||
tess_level_writes_le_one |= BITFIELD_BIT(shift);
|
||||
tess_level_writes_le_two |= BITFIELD_BIT(shift);
|
||||
tess_level_writes_gt_two |= BITFIELD_BIT(shift);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue