diff options
author | Brian Paul <[email protected]> | 2016-02-23 13:46:28 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-24 08:32:01 -0700 |
commit | c95d5c5f6fbfe4a96276e67ed279562b33432fb5 (patch) | |
tree | 3613b63ec2adf1707fb249357d8ea56f471c3eab /src/mesa/main/buffers.c | |
parent | ac37d0475cd6790cf750e40a2bbc431173cf44d7 (diff) |
mesa: replace for loop with bitshifting in supported_buffer_bitmask()
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r-- | src/mesa/main/buffers.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 70c2a21b473..26dafd1b786 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -58,10 +58,7 @@ supported_buffer_bitmask(const struct gl_context *ctx, if (_mesa_is_user_fbo(fb)) { /* A user-created renderbuffer */ - GLuint i; - for (i = 0; i < ctx->Const.MaxColorAttachments; i++) { - mask |= (BUFFER_BIT_COLOR0 << i); - } + mask = ((1 << ctx->Const.MaxColorAttachments) - 1) << BUFFER_COLOR0; } else { /* A window system framebuffer */ |