As far gl_nir_link_glsl fills xfb data we should do it after lowering clip and cull in order to get correct locations.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152
Signed-off-by: Oleksii Bozhenko <oleksii.bozhenko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21625>
spill-dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bool,Fail
spill-dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bool_requiredsubgroupsize128,Fail
-# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152
-spec@ext_transform_feedback@builtin-varyings gl_culldistance,Fail
-
# Failing (Color test failed) since wayland platform was enabled in arm builds
wayland-dEQP-EGL.functional.wide_color.window_888_colorspace_default,Fail
wayland-dEQP-EGL.functional.wide_color.window_fp16_default_colorspace,Fail
spec@arb_query_buffer_object@qbo@query-GL_TIME_ELAPSED-SYNC_CPU_READ_AFTER_CACHE_TEST-GL_UNSIGNED_INT,Fail
spec@arb_query_buffer_object@qbo@query-GL_TIME_ELAPSED-SYNC_CPU_READ_AFTER_CACHE_TEST-GL_UNSIGNED_INT64_ARB,Fail
-# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152
-spec@ext_transform_feedback@builtin-varyings gl_culldistance,Fail
-
# Excerpt:
# Image comparison failed: reference = -0.000488281, expected = 0:0:0:0, result = 0:0:0:3
# Image comparison failed: reference = 0, expected = 0:0:0:0, result = 0:0:0:3
spec@nv_copy_image@nv_copy_image-formats --samples=8@Source: GL_RGBA8_SNORM/Destination: GL_RG16I,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=8@Source: GL_RGBA8_SNORM/Destination: GL_RGBA8I,Fail
-# See issue #7152
-spec@ext_transform_feedback@builtin-varyings gl_culldistance,Fail
-
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/8348
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_tessLevel,Fail
KHR-GL46.tessellation_shader.tessellation_shader_tessellation.TES,Fail
spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail
spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail
-# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152
-spec@ext_transform_feedback@builtin-varyings gl_culldistance,Fail
-
spec@!opengl 1.1@line-smooth-coverage,Fail
spec@!opengl 1.1@line-smooth-stipple,Fail
nir_opt_access_options opt_access_options;
opt_access_options.is_vulkan = false;
NIR_PASS_V(nir, nir_opt_access, &opt_access_options);
+
+ /* Combine clip and cull outputs into one array and set:
+ * - shader_info::clip_distance_array_size
+ * - shader_info::cull_distance_array_size
+ */
+ if (!st->screen->get_param(st->screen, PIPE_CAP_CULL_DISTANCE_NOCOMBINE))
+ NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
}
if (shader_program->data->spirv) {
NIR_PASS_V(nir, nir_lower_system_values);
NIR_PASS_V(nir, nir_lower_compute_system_values, NULL);
- if (!st->screen->get_param(st->screen, PIPE_CAP_CULL_DISTANCE_NOCOMBINE))
- NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
-
if (i >= 1) {
struct gl_program *prev_shader = linked_shader[i - 1]->Program;