From 187d7fb2fec7da889f25366696faaac4c2e8f9c4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 24 Aug 2012 05:57:22 +0200 Subject: 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. --- src/gallium/auxiliary/util/u_blitter.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/auxiliary/util/u_blitter.h') diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index e06e8b12d53..2055fd64f40 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/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 -- cgit v1.2.3