diff options
author | Marek Olšák <[email protected]> | 2012-08-24 05:57:22 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-08-30 19:43:55 +0200 |
commit | 187d7fb2fec7da889f25366696faaac4c2e8f9c4 (patch) | |
tree | bd46f0a9e4fdb3309bc4b2e043b76d4db3a141af /src/gallium/auxiliary/util/u_blitter.c | |
parent | 8698a3b85dd89c5d2fa473e7942b7dc8d25f3c8f (diff) |
r600g: implement draw_rectangle callback
The color resolve on r6xx needs PT_RECTLIST. Using conventional primitive
types (triangles and quads) produces an ugly line between two diagonally
opposite corners. I guess a rectangular point sprite would work too.
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index ad4ccd9eb46..03ed91fa0b5 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/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; |