virgl: lower image variable offsets into the intrinsic range_base value
authorGert Wollny <gert.wollny@collabora.com>
Thu, 24 Nov 2022 12:26:17 +0000 (13:26 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 Jan 2023 13:19:04 +0000 (13:19 +0000)
With that we get the correct base offset when accessing image arrays.
This is required if there a various images with different access
specifiers, because only with the correct base offset the host driver is
able to pick the right array.

Fixes GL-CTS: KHR-GL43.shading_language_420pack.binding_image_array

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19980>

src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt
src/gallium/drivers/virgl/virgl_screen.c

index 7462571..3a98f41 100644 (file)
@@ -67,11 +67,6 @@ KHR-Single-GL43.arrays_of_arrays_gl.SubroutineArgumentAliasing4,Fail
 KHR-Single-GL43.arrays_of_arrays_gl.SubroutineFunctionCalls1,Fail
 KHR-Single-GL43.arrays_of_arrays_gl.SubroutineFunctionCalls2,Fail
 
-# virglrenderer translates TGSI IMAGE declaration "WR" ("image is not readonly")
-# into the writeonly qualifier, which works for gles (where each image is either
-# RO or WO) but not for desktop GL.
-KHR-GL43.shading_language_420pack.binding_image_array,Fail
-
 KHR-GL43.shading_language_420pack.binding_images,Fail
 KHR-GL43.texture_view.view_sampling,Fail
 KHR-GL43.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs,Fail
index cd96aeb..ed76f57 100644 (file)
@@ -1180,6 +1180,7 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
    }
    screen->compiler_options.lower_ffma32 = true;
    screen->compiler_options.fuse_ffma32 = false;
+   screen->compiler_options.lower_image_offset_to_range_base = true;
 
    slab_create_parent(&screen->transfer_pool, sizeof(struct virgl_transfer), 16);