projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a402c
)
r600g: use maths instead of a loop to work out mask.
author
Dave Airlie
<airlied@redhat.com>
Tue, 21 Jun 2011 05:18:44 +0000
(15:18 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Tue, 21 Jun 2011 05:18:44 +0000
(15:18 +1000)
This is equivalent results with less looping.
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_state_common.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/r600/r600_state_common.c
b/src/gallium/drivers/r600/r600_state_common.c
index 0fe0e3d5d6762dd1f59381f298c6b3ddc5260e47..30c61817a08c82754e08c42492bf691203718e8d 100644
(file)
--- a/
src/gallium/drivers/r600/r600_state_common.c
+++ b/
src/gallium/drivers/r600/r600_state_common.c
@@
-576,10
+576,7
@@
void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
if (rctx->alpha_ref_dirty)
r600_update_alpha_ref(rctx);
- mask = 0;
- for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
- mask |= (0xF << (i * 4));
- }
+ mask = (1ULL << ((unsigned)rctx->framebuffer.nr_cbufs * 4)) - 1;
if (rctx->vgt.id != R600_PIPE_STATE_VGT) {
rctx->vgt.id = R600_PIPE_STATE_VGT;