diff options
author | Timur Kristóf <timur.kristof@gmail.com> | 2022-03-23 18:44:57 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-05-10 17:16:03 +0000 |
commit | 7f189e346731f16e8be2d969d22d83dba917dca6 (patch) | |
tree | 4f60ff57f3f9acd08a7da096f129f3e73a99ee95 /src/compiler/nir/nir_range_analysis.c | |
parent | 2755acbdadcc18060fbceccddbc1fb2d1c5b6d48 (diff) | |
download | mesa-7f189e346731f16e8be2d969d22d83dba917dca6.tar.gz |
nir: Add upper bound for AMD shader arg intrinsics.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13155>
Diffstat (limited to 'src/compiler/nir/nir_range_analysis.c')
-rw-r--r-- | src/compiler/nir/nir_range_analysis.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c index 29b2903ca54..46a7dc8b469 100644 --- a/src/compiler/nir/nir_range_analysis.c +++ b/src/compiler/nir/nir_range_analysis.c @@ -1416,6 +1416,13 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht, /* Very generous maximum: TCS/TES executed by largest possible workgroup */ res = config->max_workgroup_invocations / MAX2(shader->info.tess.tcs_vertices_out, 1u); break; + case nir_intrinsic_load_scalar_arg_amd: + case nir_intrinsic_load_vector_arg_amd: { + uint32_t upper_bound = nir_intrinsic_arg_upper_bound_u32_amd(intrin); + if (upper_bound) + res = upper_bound; + break; + } default: break; } |