st/mesa: handle negative _ColorDrawBufferIndexes values correctly

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Francesco Ansanelli 2016-06-23 19:56:09 +02:00 committed by Marek Olšák
parent bc4b7ebbfd
commit 82ab3f27ff

View 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);