mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 22:20:29 +01:00
gallium/nir/tgsi: initialize file_max for inputs
When this was rewritten to support Vulkan, we stopped initializing
file_max to -1 in the case of no inputs. This causes the draw module
to go down a needlessly pessimistic case, printing an error while we're
at it.
Fixes: 42b5cfdbd2 ("gallivm/nir: fix vulkan vertex inputs")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12440>
This commit is contained in:
parent
4674698008
commit
63529782d3
1 changed files with 1 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
|
|||
info->indirect_files |= 1 << TGSI_FILE_INPUT;
|
||||
info->file_max[TGSI_FILE_INPUT] = info->num_inputs - 1;
|
||||
} else {
|
||||
int max = -1;
|
||||
int max = info->file_max[TGSI_FILE_INPUT] = -1;
|
||||
nir_foreach_shader_in_variable(var, nir) {
|
||||
int slots = glsl_count_attribute_slots(var->type, false);
|
||||
int tmax = var->data.driver_location + slots - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue