summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_blit.c8
-rw-r--r--src/mesa/swrast/s_renderbuffer.c4
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]);
}
}