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 <imirkin@alum.mit.edu>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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;
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 */