AMD folk - can you confirm that this will work with radeonsi? Unfortunately we don't support all RT formats as images in nvc0 right now.
On Mon, Jun 6, 2016 at 10:10 AM, Samuel Pitoiset <[email protected]> wrote: > This fixes the following piglits on nvc0 (tested on GK106, and should work > like a charm on Fermi as well): > > - spec/mesa_pack_invert/mesa_pack_invert-readpixels/PBO unorm BGRA > - spec/arb_pixel_buffer_object/fbo-pbo-readpixels-small > - spec/arb_pixel_buffer_object/pbo-read-argb8888 > - spec/arb_pixel_buffer_object/pbo-readpixels-small > > Tested-by: Samuel Pitoiset <[email protected]> > > > On 06/06/2016 12:59 AM, Ilia Mirkin wrote: >> >> ARB_shader_image_load_store only requires a very fixed list of formats >> to be supported, while textures may be in all kinds of formats, like >> BGRA which are presently not supported on at least Kepler. >> >> Signed-off-by: Ilia Mirkin <[email protected]> >> --- >> src/mesa/state_tracker/st_cb_readpixels.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/src/mesa/state_tracker/st_cb_readpixels.c >> b/src/mesa/state_tracker/st_cb_readpixels.c >> index 6df3a39..09450c9 100644 >> --- a/src/mesa/state_tracker/st_cb_readpixels.c >> +++ b/src/mesa/state_tracker/st_cb_readpixels.c >> @@ -79,6 +79,7 @@ try_pbo_readpixels(struct st_context *st, struct >> st_renderbuffer *strb, >> const struct gl_pixelstore_attrib *pack, void *pixels) >> { >> struct pipe_context *pipe = st->pipe; >> + struct pipe_screen *screen = pipe->screen; >> struct cso_context *cso = st->cso_context; >> struct pipe_surface *surface = strb->surface; >> struct pipe_resource *texture = strb->texture; >> @@ -91,6 +92,11 @@ try_pbo_readpixels(struct st_context *st, struct >> st_renderbuffer *strb, >> if (texture->nr_samples > 1) >> return false; >> >> + if (!screen->is_format_supported(screen, dst_format, PIPE_TEXTURE_2D, >> + texture->nr_samples, >> + PIPE_BIND_SHADER_IMAGE)) >> + return false; >> + >> desc = util_format_description(dst_format); >> >> /* Compute PBO addresses */ >> > > -- > -Samuel _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
