From: Francesco Ansanelli Date: Thu, 23 Jun 2016 17:56:09 +0000 (+0200) Subject: st/mesa: handle negative _ColorDrawBufferIndexes values correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=82ab3f27ffed2f0f8e324a384dc4eab7f9f996be;p=mesa.git st/mesa: handle negative _ColorDrawBufferIndexes values correctly Signed-off-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 9801b1fe108..d762ca660a4 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -704,7 +704,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]; + GLint idx = fb->_ColorDrawBufferIndexes[i]; if (idx >= 0) { st_manager_add_color_renderbuffer(st, fb, idx);