aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-31 15:18:29 +0200
committermarha <marha@users.sourceforge.net>2012-08-31 15:18:29 +0200
commit53192e17e55aa9ed3e3721bf4fdcb2b01a595202 (patch)
tree01d81bc7cfb5dc92584f4b7615d2ac1b09fe5411 /mesalib/src/gallium/auxiliary
parent05d67ae9117e5157fd1a5175dde6d7e48caf4653 (diff)
downloadvcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.gz
vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.tar.bz2
vcxsrv-53192e17e55aa9ed3e3721bf4fdcb2b01a595202.zip
randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver
git update 31 Aug 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c24
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.h10
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_vbuf.c4
3 files changed, 22 insertions, 16 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index ad4ccd9eb..44295c136 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -123,13 +123,6 @@ struct blitter_context_priv
boolean has_stencil_export;
};
-static void blitter_draw_rectangle(struct blitter_context *blitter,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
- float depth,
- enum blitter_attrib_type type,
- const union pipe_color_union *attrib);
-
struct blitter_context *util_blitter_create(struct pipe_context *pipe)
{
@@ -146,7 +139,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
return NULL;
ctx->base.pipe = pipe;
- ctx->base.draw_rectangle = blitter_draw_rectangle;
+ ctx->base.draw_rectangle = util_blitter_draw_rectangle;
/* init state objects for them to be considered invalid */
ctx->base.saved_blend_state = INVALID_PTR;
@@ -862,12 +855,12 @@ static void blitter_draw(struct blitter_context_priv *ctx,
pipe_resource_reference(&buf, NULL);
}
-static void blitter_draw_rectangle(struct blitter_context *blitter,
- unsigned x1, unsigned y1,
- unsigned x2, unsigned y2,
- float depth,
- enum blitter_attrib_type type,
- const union pipe_color_union *attrib)
+void util_blitter_draw_rectangle(struct blitter_context *blitter,
+ unsigned x1, unsigned y1,
+ unsigned x2, unsigned y2,
+ float depth,
+ enum blitter_attrib_type type,
+ const union pipe_color_union *attrib)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
@@ -1499,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;
@@ -1515,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/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h
index e06e8b12d..680407381 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.h
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h
@@ -129,6 +129,15 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
return blitter->pipe;
}
+/* The default function to draw a rectangle. This can only be used
+ * inside of the draw_rectangle callback if the driver overrides it. */
+void util_blitter_draw_rectangle(struct blitter_context *blitter,
+ unsigned x1, unsigned y1,
+ unsigned x2, unsigned y2,
+ float depth,
+ enum blitter_attrib_type type,
+ const union pipe_color_union *attrib);
+
/*
* These states must be saved before any of the following functions are called:
* - vertex buffers
@@ -320,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
diff --git a/mesalib/src/gallium/auxiliary/util/u_vbuf.c b/mesalib/src/gallium/auxiliary/util/u_vbuf.c
index 4141ba536..52db294cb 100644
--- a/mesalib/src/gallium/auxiliary/util/u_vbuf.c
+++ b/mesalib/src/gallium/auxiliary/util/u_vbuf.c
@@ -225,7 +225,9 @@ u_vbuf_set_vertex_elements_internal(struct u_vbuf *mgr, unsigned count,
}
assert(ve);
- pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
+
+ if (ve != mgr->ve)
+ pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
return ve;
}