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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user