[Mesa-dev] [PATCH] mesa/pbo: Handle zero height or depth when validating PBO access
Ian Romanick
idr at freedesktop.org
Tue Sep 1 15:29:57 PDT 2015
On 09/01/2015 11:17 AM, Chris Wilson wrote:
> On Tue, Sep 01, 2015 at 06:40:39PM +0100, Neil Roberts wrote:
>> It's legal to call glTexSubImage with zero values for the width,
>> height or depth. Previously this was breaking the PBO access
>> validation because it tries to work out the last pixel accessed by
>> getting the pixel at height-1 and depth-1 which would end up with
>> bogus values.
>
> Hmm. this was the style I just copied to find the access size for the
> meta_tex_image patch. Do we need to filter out no-op glTexSubImages in
> the driver backend or will the core? At the moment, it looks like this
> request will be passed along and processed by the drivers.
It seems like it should be handled in the core, and it looks like
_mesa_tex_sub_image is already doing that. Note the "if (width > 0 &&
height > 0 && depth > 0)" check. What is the callstack that gets here
with height or depth as zero? That seems fishy.
> -Chris
More information about the mesa-dev
mailing list