diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-10 13:58:44 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-10-10 13:58:44 +0200 |
commit | 288dea076e3311530214aaaa53884a6d920b590a (patch) | |
tree | 1e7ab9427d7eea482da086be26a4d4b084eadca4 /src/mesa/state_tracker/st_vdpau.c | |
parent | d245724399b7ac9e2ddf99d381f7fe092204006a (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_vdpau.c')
-rw-r--r-- | src/mesa/state_tracker/st_vdpau.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_vdpau.c b/src/mesa/state_tracker/st_vdpau.c index bb4070eec34..19611e719a1 100644 --- a/src/mesa/state_tracker/st_vdpau.c +++ b/src/mesa/state_tracker/st_vdpau.c @@ -236,6 +236,7 @@ st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access, pipe_resource_reference(&stImage->pt, res); stObj->surface_format = res->format; + stObj->level_override = 0; stObj->layer_override = layer_override; _mesa_dirty_texobj(ctx, texObj); @@ -256,6 +257,7 @@ st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access, st_texture_release_all_sampler_views(st, stObj); pipe_resource_reference(&stImage->pt, NULL); + stObj->level_override = 0; stObj->layer_override = 0; _mesa_dirty_texobj(ctx, texObj); |