aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-07-22 16:14:20 +0200
committerMarek Olšák <[email protected]>2019-07-23 14:42:20 -0400
commite9cf8c1d3010e9eada5a7921239ad7895f249b5c (patch)
treef1fc5d01e6d21a64650af3cd9e2bae5ae5dc36de /src/gallium/auxiliary/util
parentd811446e6cf0a3e9ad0cc4f5898db33031698c32 (diff)
u_blitter: add a msaa parameter to util_blitter_clear
Fixes: ea5b7de138b ("radeonsi: make gl_SampleMaskIn = 0x1 when MSAA is disabled") Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c14
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 396e23294a6..8d6909ec426 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -1451,7 +1451,8 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
unsigned clear_buffers,
const union pipe_color_union *color,
double depth, unsigned stencil,
- void *custom_blend, void *custom_dsa)
+ void *custom_blend, void *custom_dsa,
+ bool msaa)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
struct pipe_context *pipe = ctx->base.pipe;
@@ -1477,7 +1478,7 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
if (num_layers > 1 && ctx->has_layered) {
blitter_get_vs_func get_vs = get_vs_layered;
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false, msaa);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs,
0, 0, width, height,
(float) depth, num_layers, type, &attrib);
@@ -1489,7 +1490,7 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
else
get_vs = get_vs_passthrough_pos;
- blitter_set_common_draw_rect_state(ctx, false, false);
+ blitter_set_common_draw_rect_state(ctx, false, msaa);
blitter->draw_rectangle(blitter, ctx->velem_state, get_vs,
0, 0, width, height,
(float) depth, 1, type, &attrib);
@@ -1505,11 +1506,12 @@ void util_blitter_clear(struct blitter_context *blitter,
unsigned width, unsigned height, unsigned num_layers,
unsigned clear_buffers,
const union pipe_color_union *color,
- double depth, unsigned stencil)
+ double depth, unsigned stencil,
+ bool msaa)
{
util_blitter_clear_custom(blitter, width, height, num_layers,
clear_buffers, color, depth, stencil,
- NULL, NULL);
+ NULL, NULL, msaa);
}
void util_blitter_custom_clear_depth(struct blitter_context *blitter,
@@ -1518,7 +1520,7 @@ void util_blitter_custom_clear_depth(struct blitter_context *blitter,
{
static const union pipe_color_union color;
util_blitter_clear_custom(blitter, width, height, 0, 0, &color, depth, 0,
- NULL, custom_dsa);
+ NULL, custom_dsa, false);
}
void util_blitter_default_dst_texture(struct pipe_surface *dst_templ,
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index a7c931c01ca..a57e09f5fd1 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -204,7 +204,8 @@ void util_blitter_clear(struct blitter_context *blitter,
unsigned width, unsigned height, unsigned num_layers,
unsigned clear_buffers,
const union pipe_color_union *color,
- double depth, unsigned stencil);
+ double depth, unsigned stencil,
+ bool msaa);
/**
* Check if the blitter (with the help of the driver) can blit between