aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-10 13:58:44 +0200
committerNicolai Hähnle <[email protected]>2017-10-10 13:58:44 +0200
commit288dea076e3311530214aaaa53884a6d920b590a (patch)
tree1e7ab9427d7eea482da086be26a4d4b084eadca4 /src/mesa/state_tracker/st_texture.h
parentd245724399b7ac9e2ddf99d381f7fe092204006a (diff)
st/mesa: fix import of EGL images with non-zero level or layer
In GL state, textures created from EGL images look like plain 2D textures with a single level, so we use the existing layer_override facility and add an analogous level_override one. Fixes dEQP-EGL.functional.image.create.gles2_cubemap_{positive,negative}_{x,y,z}_rgba_texture Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index 8448f4c6f02..0cde0c1f409 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -111,12 +111,21 @@ struct st_texture_object
*/
enum pipe_format surface_format;
+ /* When non-zero, samplers should use this level instead of the level
+ * range specified by the GL state.
+ *
+ * This is used for EGL images, which may correspond to a single level out
+ * of an imported pipe_resources with multiple mip levels.
+ */
+ uint level_override;
+
/* When non-zero, samplers should use this layer instead of the one
* specified by the GL state.
*
- * This is used for VDPAU interop, where imported pipe_resources may be
- * array textures (containing layers with different fields) even though the
- * GL state describes one non-array texture per field.
+ * This is used for EGL images and VDPAU interop, where imported
+ * pipe_resources may be cube, 3D, or array textures (containing layers
+ * with different fields in the case of VDPAU) even though the GL state
+ * describes one non-array texture per field.
*/
uint layer_override;