diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-06 13:43:55 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-06 13:47:12 +0000 |
commit | 4af910e8be92e0ca241ce1e93e322c712dcbe340 (patch) | |
tree | 32673ebd51bd730d28a1a7544047dc1ce194a167 /src/sna/gen4_render.c | |
parent | 3244e4b23397f54ca76876dd76ebea9a0abd357e (diff) |
sna/gen4+: Trim the redundant float from the fill vertices
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r-- | src/sna/gen4_render.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index e713d351..c3e452d7 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2431,16 +2431,13 @@ gen4_render_fill_rectangle(struct sna *sna, gen4_get_rectangles(sna, op, 1, gen4_bind_surfaces); OUT_VERTEX(x+w, y+h); - OUT_VERTEX_F(1); - OUT_VERTEX_F(1); + OUT_VERTEX_F(.5); OUT_VERTEX(x, y+h); - OUT_VERTEX_F(0); - OUT_VERTEX_F(1); + OUT_VERTEX_F(.5); OUT_VERTEX(x, y); - OUT_VERTEX_F(0); - OUT_VERTEX_F(0); + OUT_VERTEX_F(.5); } static bool @@ -2514,10 +2511,10 @@ gen4_render_fill_boxes(struct sna *sna, gen4_channel_init_solid(sna, &tmp.src, pixel); tmp.is_affine = true; - tmp.floats_per_vertex = 3; - tmp.floats_per_rect = 9; + tmp.floats_per_vertex = 2; + tmp.floats_per_rect = 6; tmp.u.gen4.wm_kernel = WM_KERNEL; - tmp.u.gen4.ve_id = 2; + tmp.u.gen4.ve_id = 1; tmp.u.gen4.sf = 0; if (!kgem_check_bo(&sna->kgem, dst_bo, NULL)) { @@ -2620,10 +2617,10 @@ gen4_render_fill(struct sna *sna, uint8_t alu, op->base.mask.bo = NULL; op->base.is_affine = true; - op->base.floats_per_vertex = 3; - op->base.floats_per_rect = 9; + op->base.floats_per_vertex = 2; + op->base.floats_per_rect = 6; op->base.u.gen4.wm_kernel = WM_KERNEL; - op->base.u.gen4.ve_id = 2; + op->base.u.gen4.ve_id = 1; op->base.u.gen4.sf = 0; if (!kgem_check_bo(&sna->kgem, dst_bo, NULL)) { @@ -2697,13 +2694,13 @@ gen4_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo, tmp.mask.bo = NULL; tmp.is_affine = true; - tmp.floats_per_vertex = 3; - tmp.floats_per_rect = 9; + tmp.floats_per_vertex = 2; + tmp.floats_per_rect = 6; tmp.has_component_alpha = false; tmp.need_magic_ca_pass = false; tmp.u.gen4.wm_kernel = WM_KERNEL; - tmp.u.gen4.ve_id = 2; + tmp.u.gen4.ve_id = 1; tmp.u.gen4.sf = 0; if (!kgem_check_bo(&sna->kgem, bo, NULL)) { |