mesa: replace for loop with bitshifting in supported_buffer_bitmask()

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
Brian Paul
2016-02-23 13:46:28 -07:00
parent ac37d0475c
commit c95d5c5f6f

View File

@@ -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 */