diff options
author | Marek Olšák <[email protected]> | 2014-10-20 15:41:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-21 22:03:55 +0200 |
commit | 22c5886f3f2eabe19fda314b4d69d8075caacaae (patch) | |
tree | c883ac77cf92fb5763808aa7d4bc9adbbd9db346 /src/gallium/drivers/r300/r300_state.c | |
parent | 013850a1b7d6605e32883f2e93fa3d51cd3eb218 (diff) |
r300g: replace r300_get_num_samples with a util variant
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 7d83576cf84..fd67e35b258 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -942,30 +942,6 @@ void r300_mark_fb_state_dirty(struct r300_context *r300, /* The size of the rest of atoms stays the same. */ } -static unsigned r300_get_num_samples(struct r300_context *r300) -{ - struct pipe_framebuffer_state* fb = - (struct pipe_framebuffer_state*)r300->fb_state.state; - unsigned i, num_samples; - - if (!fb->nr_cbufs && !fb->zsbuf) - return 1; - - num_samples = 6; - - for (i = 0; i < fb->nr_cbufs; i++) - if (fb->cbufs[i]) - num_samples = MIN2(num_samples, fb->cbufs[i]->texture->nr_samples); - - if (fb->zsbuf) - num_samples = MIN2(num_samples, fb->zsbuf->texture->nr_samples); - - if (!num_samples) - num_samples = 1; - - return num_samples; -} - static void r300_set_framebuffer_state(struct pipe_context* pipe, const struct pipe_framebuffer_state* state) @@ -1073,7 +1049,7 @@ r300_set_framebuffer_state(struct pipe_context* pipe, } } - r300->num_samples = r300_get_num_samples(r300); + r300->num_samples = util_framebuffer_get_num_samples(state); /* Set up AA config. */ if (r300->num_samples > 1) { |