summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_fs.c
diff options
context:
space:
mode:
authorLucas Fryzek <lfryzek@igalia.com>2023-11-10 15:01:26 -0500
committerMarge Bot <emma+marge@anholt.net>2023-11-20 01:54:41 +0000
commit10367618da072afc4f19c21ab9b599a23dd5a762 (patch)
tree3f9519debfab749c1ab152137b2fc754996ccfc2 /src/gallium/drivers/llvmpipe/lp_state_fs.c
parent898700ca647b2de0eecff864b6b0a4cbeb935840 (diff)
gallivm/nir: Load all inputs into indirect inputs array
The code in `emit_load_var` that will attempt to read indirect inputs expects the entire array of inputs to be there. Additionally the code that populates `bld->inputs_array` will populate the array using the count of `inputs_read`, without ensuring the inputs it copies are the ones read. This change populates `bld->inputs_array` with the entire contents of bld->inputs so indirect reads will always match up. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26153>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index b380f4cd964..21312aa98e2 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1051,6 +1051,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
params.consts_ptr = consts_ptr;
params.system_values = &system_values;
params.inputs = interp->inputs;
+ params.num_inputs = interp->num_attribs - 1;
params.context_type = context_type;
params.context_ptr = context_ptr;
params.resources_type = resources_type;