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_cb_eglimage.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_cb_eglimage.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_eglimage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index e15b32ff199..bb092a2f6ef 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -226,12 +226,13 @@ st_bind_egl_image(struct gl_context *ctx, stimg->texture->width0, stimg->texture->height0, 1, 0, internalFormat, texFormat); - /* FIXME create a non-default sampler view from the stimg? */ pipe_resource_reference(&stObj->pt, stimg->texture); st_texture_release_all_sampler_views(st, stObj); pipe_resource_reference(&stImage->pt, stObj->pt); stObj->surface_format = stimg->format; + stObj->level_override = stimg->level; + stObj->layer_override = stimg->layer; _mesa_dirty_texobj(ctx, texObj); } |