Module: Mesa Branch: master Commit: 2fb4b5bdf6d10599d4b52bfca7095155a1437164 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fb4b5bdf6d10599d4b52bfca7095155a1437164
Author: Nicolai Hähnle <nicolai.haeh...@amd.com> Date: Mon Nov 7 17:49:24 2016 +0100 st/mesa: fix ReadPixels into packed formats with PBO When using the GPU download path, we bind the PBO as a buffer texture, so call is_format_supported accordingly. On radeonsi, this means that GPU downloads aren't used for UNSIGNED_SHORT_5_6_5 destinations, for example. Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pbo. Reviewed-by: Marek Olšák <marek.ol...@amd.com> Reviewed-by: Edward O'Callaghan <funfunc...@folklore1984.net> --- src/mesa/state_tracker/st_cb_readpixels.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index b79f106..cab6abe 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -112,8 +112,7 @@ 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, + if (!screen->is_format_supported(screen, dst_format, PIPE_BUFFER, 0, PIPE_BIND_SHADER_IMAGE)) return false; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit