[Mesa-dev] [PATCH v2] meta: Compute correct buffer size with SkipRows/SkipPixels

Neil Roberts neil at linux.intel.com
Tue Sep 1 09:44:30 PDT 2015


Looks good to me.

Chris Wilson <chris at chris-wilson.co.uk> writes:

> @@ -324,10 +340,9 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
>      * property.
>      */
>     image_height = packing->ImageHeight == 0 ? height : packing->ImageHeight;
> -   full_height = image_height * (depth - 1) + height;
>  
>     pbo_tex_image = create_texture_for_pbo(ctx, false, GL_PIXEL_PACK_BUFFER,
> -                                          width, full_height * depth,
> +                                          dims, width, height, depth,

It looks like this bit was wrong previously and this patch fixes it. I
think it would previously end up creating a texture that is
height*depth² tall! However it probably wouldn't really matter because
as far as I can tell this path is only used for an existing PBO so it
wouldn't end up allocating any buffers or copying any data, it would
just have the height wrong in the sampler state.

Reviewed-by: Neil Roberts <neil at linux.intel.com>

Regards,
- Neil


More information about the mesa-dev mailing list