[Mesa-dev] [PATCH] mesa: Fix error generation for glClearBuffer{i ui}v with GL_DEPTH or GL_STENCIL

Brian Paul brianp at vmware.com
Thu Nov 3 15:49:41 PDT 2011


On 11/03/2011 04:29 PM, Ian Romanick wrote:
> From: Ian Romanick<ian.d.romanick at intel.com>
>
> The spec says "Only ClearBufferiv should be used to clear
> stencil buffers." and "Only ClearBufferfv should be used to clear
> depth buffers."  However, on the following page it also says:
>
>      "The result of ClearBuffer is undefined if no conversion between
>      the type of the specified value and the type of the buffer being
>      cleared is defined (for example, if ClearBufferiv is called for a
>      fixed- or floating-point buffer, or if ClearBufferfv is called
>      for a signed or unsigned integer buffer). *This is not an error.*"
>
> Emphasis mine.
>
> Fixes problems with piglit's clearbuffer-invalid-drawbuffer test.
>
> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>

LGTM.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list