[Mesa-dev] [PATCH 2/4 v2] mesa/image: assert on bad format
eric at anholt.net
Wed Oct 26 12:48:58 PDT 2011
On Wed, 19 Oct 2011 19:45:15 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> On Wed, Oct 19, 2011 at 6:10 PM, nobled <nobled at dreamwidth.org> 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 matches the code in the non-GL_BITMAP codepath, which
> > already has an assert like this.
> > v2: Per Brian Paul's review, remove the function call entirely
> > and tighten the assert to only accept the two formats compatible with
> > GL_BITMAP. They always have one component per pixel.
> Looks good, thanks!
> Reviewed-by: Brian Paul <brianp at vmware.com>
Time to make an account and get commit access?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev