Re: [Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-28 Thread Ian Romanick
On 10/19/2011 05:10 PM, nobled wrote: NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also matc

Re: [Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-26 Thread Eric Anholt
On Wed, 19 Oct 2011 19:45:15 -0600, Brian Paul wrote: > On Wed, Oct 19, 2011 at 6:10 PM, nobled wrote: > > NULL as an error indicator is meaningless, since it will return NULL > > on success anyway if the caller passes in zero as the image's address > > and asks to calculate the offset of the fir

Re: [Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-19 Thread Brian Paul
On Wed, Oct 19, 2011 at 6:10 PM, nobled wrote: > NULL as an error indicator is meaningless, since it will return NULL > on success anyway if the caller passes in zero as the image's address > and asks to calculate the offset of the first pixel. For example, > _mesa_validate_pbo_access() does this.

[Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format

2011-10-19 Thread nobled
NULL as an error indicator is meaningless, since it will return NULL on success anyway if the caller passes in zero as the image's address and asks to calculate the offset of the first pixel. For example, _mesa_validate_pbo_access() does this. This also matches the code in the non-GL_BITMAP codepa