[Mesa-dev] [PATCH 03/16] main: fix the validation of the number of samples
Martin Peres
martin.peres at linux.intel.com
Mon Feb 23 00:51:43 PST 2015
On 20/02/15 20:38, Laura Ekstrand wrote:
> Please provide a page number and a section title in your spec comment.
I'm not very fond of giving the page number as Khronos updates the pdf
quite often
and the page number may change. Since I see so little people write the
pdf page
number, is there a policy in place?
Anyway, I updated the commit locally and I'll be updating all the other
patches.
>
> Thanks.
>
> On Mon, Feb 16, 2015 at 6:13 AM, Martin Peres
> <martin.peres at linux.intel.com <mailto:martin.peres at linux.intel.com>>
> wrote:
>
> Maybe this should be the job of the dispatch layer.
>
> Signed-off-by: Martin Peres <martin.peres at linux.intel.com
> <mailto:martin.peres at linux.intel.com>>
> ---
> src/mesa/main/multisample.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
> index 1f3fa0c..a0a659b 100644
> --- a/src/mesa/main/multisample.c
> +++ b/src/mesa/main/multisample.c
> @@ -150,6 +150,15 @@ GLenum
> _mesa_check_sample_count(struct gl_context *ctx, GLenum target,
> GLenum internalFormat, GLsizei samples)
> {
> + /* From the OpenGL core 3.0 spec, section 2.5:
> + *
> + * "If a negative number is provided where an argument of type
> sizei or
> + * sizeiptr is specified, the error INVALID VALUE is generated."
> + */
> + if (samples < 0) {
> + return GL_INVALID_VALUE;
> + }
> +
> /* If ARB_internalformat_query is supported, then treat its
> highest
> * returned sample count as the absolute maximum for this
> format; it is
> * allowed to exceed MAX_SAMPLES.
> --
> 2.3.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
More information about the mesa-dev
mailing list