mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
nir/opt_varyings: fix packing color varyings
BITSET_TEST_RANGE_INSIDE_WORD uses first_bit .. last_bit, same as BITSET_RANGE, not first_bit .. size like BITFIELD_RANGE. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
This commit is contained in:
parent
f9b03cf405
commit
a7c671efc6
1 changed files with 10 additions and 7 deletions
|
|
@ -4173,13 +4173,16 @@ compact_varyings(struct linkage_info *linkage,
|
|||
/* Set whether the shader contains any color varyings. */
|
||||
unsigned col0 = VARYING_SLOT_COL0 * 8;
|
||||
bool has_colors =
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->interp_fp32_mask, col0, 16,
|
||||
0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->convergent32_mask, col0, 16,
|
||||
0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->color32_mask, col0, 16, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->flat32_mask, col0, 16, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->xfb32_only_mask, col0, 16, 0);
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->interp_fp32_mask, col0,
|
||||
col0 + 15, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->convergent32_mask, col0,
|
||||
col0 + 15, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->color32_mask, col0,
|
||||
col0 + 15, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->flat32_mask, col0,
|
||||
col0 + 15, 0) ||
|
||||
!BITSET_TEST_RANGE_INSIDE_WORD(linkage->xfb32_only_mask, col0,
|
||||
col0 + 15, 0);
|
||||
|
||||
if (has_colors) {
|
||||
unsigned color_channel_rotate = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue