st/mesa: Set pipe_image_view::shader_access in PBO readpixels.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 1 Feb 2019 00:54:43 +0000 (16:54 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 4 Feb 2019 19:17:56 +0000 (11:17 -0800)
Commit 8b626a22b24089edf90cb1b06e5b1895bb36c61b introduced a new
pipe_image_view::shader_access field, indicating the access mode
specified in the shader.  st/mesa's built-in PBO download shader
creates a write-only image buffer, so we should flag it as such.

Nobody uses this field yet (Iris will), so we don't need to backport
this fix to stable branches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_readpixels.c

index 3e008904eff160fe5e30b7c71111d6a4f85610f9..f614849b9562a19a1ecab1a61aa8c247594e92da 100644 (file)
@@ -199,6 +199,7 @@ try_pbo_readpixels(struct st_context *st, struct st_renderbuffer *strb,
       image.resource = addr.buffer;
       image.format = dst_format;
       image.access = PIPE_IMAGE_ACCESS_WRITE;
+      image.shader_access = PIPE_IMAGE_ACCESS_WRITE;
       image.u.buf.offset = addr.first_element * addr.bytes_per_pixel;
       image.u.buf.size = (addr.last_element - addr.first_element + 1) *
                          addr.bytes_per_pixel;