diff options
author | Brian Paul <[email protected]> | 2017-11-08 22:18:40 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-11-09 14:13:59 -0700 |
commit | f8bae523d98953aa17105ecf12c5db499deb58ad (patch) | |
tree | 718d93771894324eaf2cbb94bbc8769dc2680080 /src/mesa/swrast | |
parent | 366453f4d36e75bb4d8ec66feb5db7c92c748739 (diff) |
mesa: s/GLint/gl_buffer_index/ for _ColorDrawBufferIndexes
Also fix local variable declarations and replace -1 with BUFFER_NONE.
No Piglit changes.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_blit.c | 8 | ||||
-rw-r--r-- | src/mesa/swrast/s_renderbuffer.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c index 3e838a41d44..19fe8484eb9 100644 --- a/src/mesa/swrast/s_blit.c +++ b/src/mesa/swrast/s_blit.c @@ -198,8 +198,8 @@ blit_nearest(struct gl_context *ctx, /* Blit to all the draw buffers */ for (i = 0; i < numDrawBuffers; i++) { if (buffer == GL_COLOR_BUFFER_BIT) { - int idx = drawFb->_ColorDrawBufferIndexes[i]; - if (idx == -1) + gl_buffer_index idx = drawFb->_ColorDrawBufferIndexes[i]; + if (idx == BUFFER_NONE) continue; drawAtt = &drawFb->Attachment[idx]; drawRb = drawAtt->Renderbuffer; @@ -569,12 +569,12 @@ blit_linear(struct gl_context *ctx, } for (i = 0; i < drawFb->_NumColorDrawBuffers; i++) { - GLint idx = drawFb->_ColorDrawBufferIndexes[i]; + gl_buffer_index idx = drawFb->_ColorDrawBufferIndexes[i]; struct gl_renderbuffer_attachment *drawAtt; struct gl_renderbuffer *drawRb; mesa_format drawFormat; - if (idx == -1) + if (idx == BUFFER_NONE) continue; drawAtt = &drawFb->Attachment[idx]; diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index 66a823def32..f76489c2005 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -659,7 +659,7 @@ _swrast_map_renderbuffers(struct gl_context *ctx) } for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) { - if (fb->_ColorDrawBufferIndexes[buf] >= 0) { + if (fb->_ColorDrawBufferIndexes[buf] != BUFFER_NONE) { map_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); find_renderbuffer_colortype(fb->_ColorDrawBuffers[buf]); } @@ -690,7 +690,7 @@ _swrast_unmap_renderbuffers(struct gl_context *ctx) } for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) { - if (fb->_ColorDrawBufferIndexes[buf] >= 0) { + if (fb->_ColorDrawBufferIndexes[buf] != BUFFER_NONE) { unmap_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); } } |