mesa/st: calculate texture size based on EGLImage miplevel

Fixes issues with 'egl-gl_oes_egl_image' Piglit test.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Tapani Pälli
2019-09-24 14:34:40 +03:00
parent fafd20f67d
commit 031752798b
+5 -2
View File
@@ -271,8 +271,11 @@ st_bind_egl_image(struct gl_context *ctx,
}
assert(texFormat != MESA_FORMAT_NONE);
_mesa_init_teximage_fields(ctx, texImage,
stimg->texture->width0, stimg->texture->height0,
/* Minify texture size based on level set on the EGLImage. */
uint32_t width = u_minify(stimg->texture->width0, stimg->level);
uint32_t height = u_minify(stimg->texture->height0, stimg->level);
_mesa_init_teximage_fields(ctx, texImage, width, height,
1, 0, internalFormat, texFormat);
pipe_resource_reference(&stObj->pt, stimg->texture);