Skip to content
Snippets Groups Projects
Commit 8bffd601 authored by Timothy Arceri's avatar Timothy Arceri Committed by Marge Bot
Browse files

Revert "nir: Preserve offsets in lower_io_to_scalar_early"


This reverts commit 96fa23bc.

The correct fix to the problem was a1bc1523, making this
change obsolete as the pass skips any vars marked with
always_active_io. There was no real advantage to allowing these
vars to be split because they can't be removed anyway. Also there
is no way to split varying arrays gracefully here due to the xfb
layout rules, and this change didn't handle arrays at all.

Removing this obsolete code also fixes an assert in the new CTS
test KHR-Single-GL45.enhanced_layouts.xfb_all_stages. The test
was legally adding xfb offsets to all vertex stages but since
we only mark the varyings in the final vertex stage with the
always_active_io flag the other stages were correctly lowering
to scalars but when an array with an offset hit this code it
asserted since it couldn't handle it.

Acked-by: default avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

Fixes: a1bc1523 ("spirv: mark variables decorated with XfbBuffer as always active")
Closes: mesa/mesa#6928
Part-of: <mesa/mesa!17878>
parent 3712609e
No related branches found
No related tags found
No related merge requests found
......@@ -341,10 +341,6 @@ lower_load_to_scalar_early(nir_builder *b, nir_intrinsic_instr *intr,
chan_var = nir_variable_clone(var, b->shader);
chan_var->data.location_frac = var->data.location_frac + i;
chan_var->type = glsl_channel_type(chan_var->type);
if (var->data.explicit_offset) {
unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
chan_var->data.offset = var->data.offset + i * comp_size;
}
chan_vars[var->data.location_frac + i] = chan_var;
......@@ -399,10 +395,6 @@ lower_store_output_to_scalar_early(nir_builder *b, nir_intrinsic_instr *intr,
chan_var = nir_variable_clone(var, b->shader);
chan_var->data.location_frac = var->data.location_frac + i;
chan_var->type = glsl_channel_type(chan_var->type);
if (var->data.explicit_offset) {
unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
chan_var->data.offset = var->data.offset + i * comp_size;
}
chan_vars[var->data.location_frac + i] = chan_var;
......
......@@ -23,9 +23,6 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fa
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL45.enhanced_layouts.xfb_all_stages,Crash
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail
......
......@@ -14,6 +14,3 @@ dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x8,Fail
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.12,Crash
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.12,Crash
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
......@@ -12,6 +12,3 @@ dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.6x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x5,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x8,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
......@@ -4,6 +4,3 @@ KHR-GL46.texture_buffer.texture_buffer_atomic_functions,Fail
KHR-GLES31.core.texture_buffer.texture_buffer_atomic_functions,Fail
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.12,Crash
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
......@@ -13,9 +13,6 @@ dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x5,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x8,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
glx@glx-swap-pixmap-bad,Fail
# failed to create drawable
......
......@@ -12,6 +12,3 @@ dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.6x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x5,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x6,Fail
dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x8,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878
KHR-Single-GL46.enhanced_layouts.xfb_all_stages,Crash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment