[Mesa-dev] [PATCH 2/4] meta/copy_image: Use the correct texture level when creating views

Jason Ekstrand jason at jlekstrand.net
Tue Sep 2 15:49:14 PDT 2014


Previously, we were accidentally assuming that the level of both textures
was 0.  Now we actually use the correct level in our hacked texture view.
This doesn't 100% fix the meta path because the texture type is getting
lost somewhere in the pipeline.  However, it actually copies to/from the
correct layer now.

Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
---
 src/mesa/drivers/common/meta_copy_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c
index c40c2f0..0c204b8 100644
--- a/src/mesa/drivers/common/meta_copy_image.c
+++ b/src/mesa/drivers/common/meta_copy_image.c
@@ -74,7 +74,7 @@ make_view(struct gl_context *ctx, struct gl_texture_image *tex_image,
                               tex_image->Depth,
                               0, internal_format, tex_format);
 
-   view_tex_obj->MinLevel = 0;
+   view_tex_obj->MinLevel = tex_image->Level;
    view_tex_obj->NumLevels = 1;
    view_tex_obj->MinLayer = tex_obj->MinLayer;
    view_tex_obj->NumLayers = tex_obj->NumLayers;
-- 
2.1.0



More information about the mesa-dev mailing list