[Mesa-dev] [PATCH 3/3] st/mesa: add a simple sanity check assertion in st_validate_attachment()

Marek Olšák maraeo at gmail.com
Fri Jan 24 02:59:50 PST 2014


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Jan 24, 2014 at 2:20 AM, Brian Paul <brianp at vmware.com> wrote:
> ---
>  src/mesa/state_tracker/st_cb_fbo.c |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index eca04b8..7801484 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -544,6 +544,12 @@ st_validate_attachment(struct gl_context *ctx,
>     gl_format texFormat;
>     GLboolean valid;
>
> +   /* Sanity check: we must be binding the surface as a (color) render target
> +    * or depth/stencil target.
> +    */
> +   assert(bindings == PIPE_BIND_RENDER_TARGET ||
> +          bindings == PIPE_BIND_DEPTH_STENCIL);
> +
>     /* Only validate texture attachments for now, since
>      * st_renderbuffer_alloc_storage makes sure that
>      * the format is supported.
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list