diff options
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 64 |
4 files changed, 0 insertions, 70 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index c98206fe903..a3cfdae6b73 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -22,7 +22,6 @@ */ #include "r600_pipe.h" #include "util/u_surface.h" -#include "util/u_blitter.h" #include "util/u_format.h" #include "evergreend.h" diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 4543347555e..226ad6e0200 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -30,7 +30,6 @@ #include <errno.h> #include "pipe/p_shader_tokens.h" -#include "util/u_blitter.h" #include "util/u_debug.h" #include "util/u_memory.h" #include "util/u_simple_shaders.h" diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index d04fef80df1..ee836b771f7 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -32,7 +32,6 @@ #include "r600_llvm.h" #include "r600_public.h" -#include "util/u_blitter.h" #include "util/u_suballoc.h" #include "util/u_double_list.h" #include "util/u_transfer.h" @@ -633,9 +632,6 @@ void r600_sampler_views_dirty(struct r600_context *rctx, void r600_sampler_states_dirty(struct r600_context *rctx, struct r600_sampler_states *state); void r600_constant_buffers_dirty(struct r600_context *rctx, struct r600_constbuf_state *state); -void r600_draw_rectangle(struct blitter_context *blitter, - int x1, int y1, int x2, int y2, float depth, - enum blitter_attrib_type type, const union pipe_color_union *attrib); uint32_t r600_translate_stencil_op(int s_op); uint32_t r600_translate_fill(uint32_t func); unsigned r600_tex_wrap(unsigned wrap); diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index d29e137d511..d2f0d174c9f 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -28,7 +28,6 @@ #include "r600_shader.h" #include "r600d.h" -#include "util/u_draw_quad.h" #include "util/u_format_s3tc.h" #include "util/u_index_modify.h" #include "util/u_memory.h" @@ -36,8 +35,6 @@ #include "util/u_math.h" #include "tgsi/tgsi_parse.h" -#define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX - void r600_init_command_buffer(struct r600_command_buffer *cb, unsigned num_dw) { assert(!cb->buf); @@ -1550,67 +1547,6 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info rctx->b.num_draw_calls++; } -void r600_draw_rectangle(struct blitter_context *blitter, - int x1, int y1, int x2, int y2, float depth, - enum blitter_attrib_type type, const union pipe_color_union *attrib) -{ - struct r600_context *rctx = (struct r600_context*)util_blitter_get_pipe(blitter); - struct pipe_viewport_state viewport; - struct pipe_resource *buf = NULL; - unsigned offset = 0; - float *vb; - - if (type == UTIL_BLITTER_ATTRIB_TEXCOORD) { - util_blitter_draw_rectangle(blitter, x1, y1, x2, y2, depth, type, attrib); - return; - } - - /* Some operations (like color resolve on r6xx) don't work - * with the conventional primitive types. - * One that works is PT_RECTLIST, which we use here. */ - - /* setup viewport */ - viewport.scale[0] = 1.0f; - viewport.scale[1] = 1.0f; - viewport.scale[2] = 1.0f; - viewport.scale[3] = 1.0f; - viewport.translate[0] = 0.0f; - viewport.translate[1] = 0.0f; - viewport.translate[2] = 0.0f; - viewport.translate[3] = 0.0f; - rctx->b.b.set_viewport_states(&rctx->b.b, 0, 1, &viewport); - - /* Upload vertices. The hw rectangle has only 3 vertices, - * I guess the 4th one is derived from the first 3. - * The vertex specification should match u_blitter's vertex element state. */ - u_upload_alloc(rctx->b.uploader, 0, sizeof(float) * 24, &offset, &buf, (void**)&vb); - vb[0] = x1; - vb[1] = y1; - vb[2] = depth; - vb[3] = 1; - - vb[8] = x1; - vb[9] = y2; - vb[10] = depth; - vb[11] = 1; - - vb[16] = x2; - vb[17] = y1; - vb[18] = depth; - vb[19] = 1; - - if (attrib) { - memcpy(vb+4, attrib->f, sizeof(float)*4); - memcpy(vb+12, attrib->f, sizeof(float)*4); - memcpy(vb+20, attrib->f, sizeof(float)*4); - } - - /* draw */ - util_draw_vertex_buffer(&rctx->b.b, NULL, buf, rctx->blitter->vb_slot, offset, - R600_PRIM_RECTANGLE_LIST, 3, 2); - pipe_resource_reference(&buf, NULL); -} - uint32_t r600_translate_stencil_op(int s_op) { switch (s_op) { |