mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
spirv2dxil: For removing unused vars, consider the whole I/O var size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614>
This commit is contained in:
parent
85f44304d8
commit
00b9c10cf7
1 changed files with 2 additions and 2 deletions
|
|
@ -504,7 +504,7 @@ kill_undefined_varyings(struct nir_builder *b,
|
|||
uint64_t written = var->data.patch ?
|
||||
prev_stage_nir->info.patch_outputs_written :
|
||||
prev_stage_nir->info.outputs_written;
|
||||
if (BITFIELD64_BIT(loc) & written)
|
||||
if (BITFIELD64_RANGE(loc, glsl_varying_count(var->type)) & written)
|
||||
return false;
|
||||
|
||||
b->cursor = nir_after_instr(instr);
|
||||
|
|
@ -555,7 +555,7 @@ kill_unused_outputs(struct nir_builder *b,
|
|||
unsigned loc = var->data.patch ?
|
||||
var->data.location - VARYING_SLOT_PATCH0 :
|
||||
var->data.location;
|
||||
if (!(BITFIELD64_BIT(loc) & kill_mask))
|
||||
if (!(BITFIELD64_RANGE(loc, glsl_varying_count(var->type)) & kill_mask))
|
||||
return false;
|
||||
|
||||
nir_instr_remove(instr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue