projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac37d04
)
mesa: replace for loop with bitshifting in supported_buffer_bitmask()
author
Brian Paul
<brianp@vmware.com>
Tue, 23 Feb 2016 20:46:28 +0000
(13:46 -0700)
committer
Brian Paul
<brianp@vmware.com>
Wed, 24 Feb 2016 15:32:01 +0000
(08:32 -0700)
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/main/buffers.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/buffers.c
b/src/mesa/main/buffers.c
index 70c2a21b473110c8a7cbfc0ca298d404275cc64d..26dafd1b786ac07e4576414ab5d2f407dccb9216 100644
(file)
--- 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 */