mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 10:50:39 +02:00
radv/llvm: gather VS input usage mask from load_input
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>
This commit is contained in:
parent
1c4a21328e
commit
b3402997a5
1 changed files with 22 additions and 0 deletions
|
|
@ -112,6 +112,25 @@ gather_intrinsic_load_deref_info(const nir_shader *nir,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gather_intrinsic_load_input_info(const nir_shader *nir,
|
||||
const nir_intrinsic_instr *instr,
|
||||
struct radv_shader_info *info)
|
||||
{
|
||||
switch (nir->info.stage) {
|
||||
case MESA_SHADER_VERTEX: {
|
||||
unsigned idx = nir_intrinsic_io_semantics(instr).location;
|
||||
unsigned component = nir_intrinsic_component(instr);
|
||||
unsigned mask = nir_ssa_def_components_read(&instr->dest.ssa);
|
||||
|
||||
info->vs.input_usage_mask[idx] |= mask << component;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
widen_writemask(uint32_t wrmask)
|
||||
{
|
||||
|
|
@ -384,6 +403,9 @@ gather_intrinsic_info(const nir_shader *nir, const nir_intrinsic_instr *instr,
|
|||
case nir_intrinsic_global_atomic_comp_swap:
|
||||
set_writes_memory(nir, info);
|
||||
break;
|
||||
case nir_intrinsic_load_input:
|
||||
gather_intrinsic_load_input_info(nir, instr, info);
|
||||
break;
|
||||
case nir_intrinsic_load_deref:
|
||||
gather_intrinsic_load_deref_info(nir, instr, info);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue