[Mesa-dev] [PATCH] st/mesa: Remove tautological check

Ilia Mirkin imirkin at alum.mit.edu
Wed Jun 15 19:44:33 UTC 2016


I'd say the proper action is to fix the idx type... we have code like:

src/mesa/main/buffers.c:         fb->_ColorDrawBufferIndexes[buf] = -1;
src/mesa/main/mtypes.h:   GLint
_ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; /**< BUFFER_x or -1 */

  -ilia

On Wed, Jun 15, 2016 at 3:25 PM,  <francians at gmail.com> wrote:
> From: Francesco Ansanelli <francians at gmail.com>
>
> ---
>  src/mesa/state_tracker/st_cb_fbo.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index a53b95a..ba9955c 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -705,10 +705,7 @@ st_DrawBuffers(struct gl_context *ctx, GLsizei count, const GLenum *buffers)
>     /* add the renderbuffers on demand */
>     for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
>        gl_buffer_index idx = fb->_ColorDrawBufferIndexes[i];
> -
> -      if (idx >= 0) {
> -         st_manager_add_color_renderbuffer(st, fb, idx);
> -      }
> +      st_manager_add_color_renderbuffer(st, fb, idx);
>     }
>  }
>
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list