summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-11-08 22:18:40 -0700
committerBrian Paul <[email protected]>2017-11-09 14:13:59 -0700
commitf8bae523d98953aa17105ecf12c5db499deb58ad (patch)
tree718d93771894324eaf2cbb94bbc8769dc2680080 /src/mesa/state_tracker
parent366453f4d36e75bb4d8ec66feb5db7c92c748739 (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/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c4
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index cda9c71729c..f50f8442d55 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -412,9 +412,9 @@ st_Clear(struct gl_context *ctx, GLbitfield mask)
if (mask & BUFFER_BITS_COLOR) {
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
- GLint b = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
+ gl_buffer_index b = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
- if (b >= 0 && mask & (1 << b)) {
+ if (b != BUFFER_NONE && mask & (1 << b)) {
struct gl_renderbuffer *rb
= ctx->DrawBuffer->Attachment[b].Renderbuffer;
struct st_renderbuffer *strb = st_renderbuffer(rb);
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index a7c286bcc52..e2303b4011f 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -721,9 +721,9 @@ st_DrawBuffers(struct gl_context *ctx, GLsizei count, const GLenum *buffers)
GLuint i;
/* add the renderbuffers on demand */
for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
- GLint idx = fb->_ColorDrawBufferIndexes[i];
+ gl_buffer_index idx = fb->_ColorDrawBufferIndexes[i];
- if (idx >= 0) {
+ if (idx != BUFFER_NONE) {
st_manager_add_color_renderbuffer(st, fb, idx);
}
}