summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-08-30 05:38:02 +0200
committerMarek Olšák <[email protected]>2012-08-31 01:19:03 +0200
commit64db3cc6ad2d52dec46119e5b80030393cb60bf4 (patch)
treefab4b4b57c3ff9da009a766d78ec3e7ecb769ed1 /src/gallium/auxiliary
parentf8a8f069ee2dae35470c6e2a681e5e110044e6fe (diff)
r600g: implement MSAA for Cayman
Everything works except for blitting MSAA colorbuffers, which isn't so trivial on Cayman. It's a rarely-used feature anyway.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c3
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 03ed91fa0b5..44295c136a6 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -1492,6 +1492,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
unsigned dst_layer,
struct pipe_resource *src,
unsigned src_layer,
+ unsigned sample_mask,
void *custom_blend)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
@@ -1508,7 +1509,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE));
- pipe->set_sample_mask(pipe, (1ull << MAX2(1, src->nr_samples)) - 1);
+ pipe->set_sample_mask(pipe, sample_mask);
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
surf_tmpl.format = dst->format;
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index 2055fd64f40..680407381a6 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -329,6 +329,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
unsigned dst_layer,
struct pipe_resource *src,
unsigned src_layer,
+ unsigned sampled_mask,
void *custom_blend);
/* The functions below should be used to save currently bound constant state