st/mesa: handle negative _ColorDrawBufferIndexes values correctly
authorFrancesco Ansanelli <francians@gmail.com>
Thu, 23 Jun 2016 17:56:09 +0000 (19:56 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 24 Jun 2016 10:41:22 +0000 (12:41 +0200)
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_fbo.c

index 9801b1fe10897e842da310b7aac15b0a9f4734f3..d762ca660a42f507e563f7af4d375cf753803735 100644 (file)
@@ -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);