diff options
author | Ilia Mirkin <[email protected]> | 2016-07-08 02:44:57 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-12 20:21:08 -0400 |
commit | d816a51b81f42b0aa4819a32587b4aa167e4b541 (patch) | |
tree | a8a69c2e756c2d5e1925d3f2de62fa64bc937e8f /src/mesa/state_tracker/st_extensions.c | |
parent | 7727e6f67c47ab0a36d5646092ee89852523cad8 (diff) |
st/mesa: provide GL_OES_copy_image support by caching the original ETC data
The additional provision of GL_OES_copy_image is that it work for ETC.
However many desktop GPUs don't have native ETC support, so st/mesa does
the decoding by hand. Instead of discarding the compressed data, keep it
around in CPU memory. Use it when performing image copies.
Signed-off-by: Ilia Mirkin <[email protected]>
Acked-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d0e7d3840f5..1f53bdfd365 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -582,6 +582,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(ARB_color_buffer_float), PIPE_CAP_VERTEX_COLOR_UNCLAMPED }, { o(ARB_conditional_render_inverted), PIPE_CAP_CONDITIONAL_RENDER_INVERTED }, { o(ARB_copy_image), PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS }, + { o(OES_copy_image), PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS }, { o(ARB_cull_distance), PIPE_CAP_CULL_DISTANCE }, { o(ARB_depth_clamp), PIPE_CAP_DEPTH_CLIP_DISABLE }, { o(ARB_depth_texture), PIPE_CAP_TEXTURE_SHADOW_MAP }, @@ -955,17 +956,6 @@ void st_init_extensions(struct pipe_screen *screen, extensions->OES_sample_variables = extensions->ARB_sample_shading && extensions->ARB_gpu_shader5; - /* If we don't have native ETC2 support, we don't keep track of the - * original ETC2 data. This is necessary to be able to copy images between - * compatible view classes. - */ - if (extensions->ARB_copy_image && screen->is_format_supported( - screen, PIPE_FORMAT_ETC2_RGB8, - PIPE_TEXTURE_2D, 0, - PIPE_BIND_SAMPLER_VIEW)) { - extensions->OES_copy_image = GL_TRUE; - } - /* Maximum sample count. */ { enum pipe_format color_formats[] = { |