[Piglit] [PATCH] max-texture-size: allow INVALID_VALUE if first TexImage fails with OUT_OF_MEMORY

Marek Olšák maraeo at gmail.com
Fri Jun 22 09:59:44 PDT 2012


On Tue, Jun 19, 2012 at 7:41 PM, Eric Anholt <eric at anholt.net> wrote:
> On Fri, 15 Jun 2012 04:28:54 +0200, Marek Olšák <maraeo at gmail.com> wrote:
>> The GL spec says that the behavior of a command returning OUT_OF_MEMORY is
>> undefined, therefore the following call to TexSubImage may return INVALID_VALUE.
>> (e.g. if TexWidth is 0 because the call to TexImage had no effect because
>> of OUT_OF_MEMORY, then the check "xoffset+width > TexWidth" in TexSubImage will
>> always set INVALID_VALUE)
>
> Why are we continuing to test the texture after GL_OUT_OF_MEMORY?
> Shouldn't we delete it and give up?

I did not write the test, I am just trying to make it pass when it should.

Marek


More information about the Piglit mailing list