From db51ab6d6ada69287dfe3a671ecc1b338917e7aa Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 18 Aug 2014 00:55:40 +0200 Subject: radeonsi: use r600_draw_rectangle from r600g MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rectangles are easier than triangles for the rasterizer. Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_blit.c | 1 - src/gallium/drivers/radeonsi/si_pipe.c | 2 +- src/gallium/drivers/radeonsi/si_state_draw.c | 7 ++++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 9a7a2fef690..2806b468ee5 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -22,7 +22,6 @@ */ #include "si_pipe.h" -#include "util/u_blitter.h" #include "util/u_format.h" enum si_blitter_op /* bitmask */ diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 3c3d642b791..845ab20da37 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -26,7 +26,6 @@ #include "sid.h" #include "radeon/radeon_uvd.h" -#include "util/u_blitter.h" #include "util/u_memory.h" #include "util/u_simple_shaders.h" #include "vl/vl_decoder.h" @@ -128,6 +127,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void * sctx->blitter = util_blitter_create(&sctx->b.b); if (sctx->blitter == NULL) goto fail; + sctx->blitter->draw_rectangle = r600_draw_rectangle; sctx->dummy_pixel_shader = util_make_fragment_cloneinput_shader(&sctx->b.b, 0, diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 411ea04059f..573487cedab 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -29,7 +29,6 @@ #include "../radeon/r600_cs.h" #include "sid.h" -#include "util/u_blitter.h" #include "util/u_format.h" #include "util/u_index_modify.h" #include "util/u_memory.h" @@ -346,7 +345,8 @@ static unsigned si_conv_pipe_prim(unsigned pprim) [PIPE_PRIM_LINES_ADJACENCY] = V_008958_DI_PT_LINELIST_ADJ, [PIPE_PRIM_LINE_STRIP_ADJACENCY] = V_008958_DI_PT_LINESTRIP_ADJ, [PIPE_PRIM_TRIANGLES_ADJACENCY] = V_008958_DI_PT_TRILIST_ADJ, - [PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_008958_DI_PT_TRISTRIP_ADJ + [PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_008958_DI_PT_TRISTRIP_ADJ, + [R600_PRIM_RECTANGLE_LIST] = V_008958_DI_PT_RECTLIST }; unsigned result = prim_conv[pprim]; if (result == ~0) { @@ -371,7 +371,8 @@ static unsigned si_conv_prim_to_gs_out(unsigned mode) [PIPE_PRIM_LINES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP, [PIPE_PRIM_LINE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP, [PIPE_PRIM_TRIANGLES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP, - [PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP + [PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP, + [R600_PRIM_RECTANGLE_LIST] = V_028A6C_OUTPRIM_TYPE_TRISTRIP }; assert(mode < Elements(prim_conv)); -- cgit v1.2.3