[Mesa-dev] [PATCH 2/2] mesa: rearrange texture error checking order
imirkin at alum.mit.edu
Wed Jul 22 10:29:07 PDT 2015
On Wed, Jul 22, 2015 at 1:20 PM, Brian Paul <brianp at vmware.com> wrote:
> On 07/22/2015 11:02 AM, Ilia Mirkin wrote:
>> This moves the width/height/depth == 0 check to the front and avoids
>> doing any other checking when that is the case.
>> Also moves the dimensions check after the format/type checks so that we
>> don't bail out with success on a width/height/depth == 0 request when
>> the format/type don't match.
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> I suspect this isn't really needed in light of my patch to
> I believe the test was in error, or at least sloppy, in that it was calling
> glGetTexImage to test format/type validation when there wasn't even a
> texture image to return. The OpenGL spec doesn't specify an order for error
> checking multiple things, so if there's multiple errors, you can't be sure
> which one will be reported first. My patch to the test removes that
Well, irrespective of the piglit test, the current code is a little
suspect -- it does the width/height/depth == 0 checks after it ensures
that height == 1 for 1d and depth == 1 for 2d. Any thoughts on that?
More information about the mesa-dev