diff options
author | Hyunjun Ko <[email protected]> | 2020-04-06 04:55:19 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-06 08:55:05 +0000 |
commit | 9f174eb2df128dd89f61ac07b5d394c24668a43c (patch) | |
tree | 3263d490739a58b3968d25484cde80a3ab46ceab /src/compiler | |
parent | 84e845c9696ab673f1d95fda47843028ed0c71a7 (diff) |
nir: fix wrong assignment to buffer in xfb_varyings_info
Tested with dEQP-VK.transform_feedback.fuzz.various_buffers.buffers100_instance_array_vertex
Signed-off-by: Hyunjun Ko <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Cc: [email protected]
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4459>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4459>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_gather_xfb_info.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/nir/nir_gather_xfb_info.c b/src/compiler/nir/nir_gather_xfb_info.c index bcbc2a3a4c3..7a3ce7966d3 100644 --- a/src/compiler/nir/nir_gather_xfb_info.c +++ b/src/compiler/nir/nir_gather_xfb_info.c @@ -28,7 +28,7 @@ static void add_var_xfb_varying(nir_xfb_info *xfb, nir_xfb_varyings_info *varyings, - nir_variable *var, + unsigned buffer, unsigned offset, const struct glsl_type *type) { @@ -38,9 +38,9 @@ add_var_xfb_varying(nir_xfb_info *xfb, nir_xfb_varying_info *varying = &varyings->varyings[varyings->varying_count++]; varying->type = type; - varying->buffer = var->data.xfb.buffer; + varying->buffer = buffer; varying->offset = offset; - xfb->buffers[var->data.xfb.buffer].varying_count++; + xfb->buffers[buffer].varying_count++; } @@ -83,7 +83,7 @@ add_var_xfb_outputs(nir_xfb_info *xfb, if (!glsl_type_is_array(child_type) && !glsl_type_is_struct(child_type)) { - add_var_xfb_varying(xfb, varyings, var, *offset, type); + add_var_xfb_varying(xfb, varyings, buffer, *offset, type); varying_added = true; } @@ -138,7 +138,7 @@ add_var_xfb_outputs(nir_xfb_info *xfb, unsigned comp_offset = var->data.location_frac; if (!varying_added) { - add_var_xfb_varying(xfb, varyings, var, *offset, type); + add_var_xfb_varying(xfb, varyings, buffer, *offset, type); } while (comp_mask) { |