diff options
author | Marek Olšák <[email protected]> | 2014-05-06 13:53:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-05-10 13:58:46 +0200 |
commit | 58c659703bed86ea004a2e64ee231e3ba99b3d45 (patch) | |
tree | 3caba4c990014d4c5e53997f5f1ad0475b1d3ee5 /src/gallium/drivers/r600/evergreen_state.c | |
parent | 155f98d49fdc2f46c760f8214327b3804ee60079 (diff) |
r600g: simplify framebuffer state size computation
Take the upper bound. The number doesn't have to absolutely correct, only safe.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index f7a63a8e710..7b1a44b635c 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1394,32 +1394,10 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx, rctx->framebuffer.atom.num_dw = 4; /* SCISSOR */ /* MSAA. */ - if (rctx->b.chip_class == EVERGREEN) { - switch (rctx->framebuffer.nr_samples) { - case 2: - case 4: - rctx->framebuffer.atom.num_dw += 6; - break; - case 8: - rctx->framebuffer.atom.num_dw += 10; - break; - } - rctx->framebuffer.atom.num_dw += 4; - } else { - switch (rctx->framebuffer.nr_samples) { - case 2: - case 4: - rctx->framebuffer.atom.num_dw += 12; - break; - case 8: - rctx->framebuffer.atom.num_dw += 16; - break; - case 16: - rctx->framebuffer.atom.num_dw += 18; - break; - } - rctx->framebuffer.atom.num_dw += 7; - } + if (rctx->b.chip_class == EVERGREEN) + rctx->framebuffer.atom.num_dw += 14; /* Evergreen */ + else + rctx->framebuffer.atom.num_dw += 25; /* Cayman */ /* Colorbuffers. */ rctx->framebuffer.atom.num_dw += state->nr_cbufs * 23; |