diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-21 02:00:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-21 16:11:15 +0100 |
commit | c2040fb8e62076d87f7a5b407505ee3f3482945e (patch) | |
tree | bf8578860a68c898e91eec6ce8d384212e6a67f4 /src/sna | |
parent | 7e7759db4c1dbf8b782fab9b9ca95cfa1db6cf59 (diff) |
sna: Remove the memset(0) of the fill op
The backends are all expected to initialise the state required.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/gen2_render.c | 1 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 5 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 10 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 5 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 5 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 3 |
6 files changed, 26 insertions, 3 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index 98360b8c..7c72f416 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -2099,6 +2099,7 @@ gen2_render_fill(struct sna *sna, uint8_t alu, tmp->base.dst.height = dst->drawable.height; tmp->base.dst.format = sna_format_for_depth(dst->drawable.depth); tmp->base.dst.bo = dst_bo; + tmp->base.dst.x = tmp->base.dst.y = 0; tmp->base.floats_per_vertex = 2; tmp->base.floats_per_rect = 6; diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index f099fbf0..0092f603 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2558,6 +2558,7 @@ gen4_render_fill(struct sna *sna, uint8_t alu, op->base.dst.height = dst->drawable.height; op->base.dst.format = sna_format_for_depth(dst->drawable.depth); op->base.dst.bo = dst_bo; + op->base.dst.x = op->base.dst.y = 0; op->base.src.bo = sna_render_get_solid(sna, @@ -2566,6 +2567,10 @@ gen4_render_fill(struct sna *sna, uint8_t alu, op->base.src.filter = SAMPLER_FILTER_NEAREST; op->base.src.repeat = SAMPLER_EXTEND_REPEAT; + op->base.mask.bo = NULL; + op->base.mask.filter = SAMPLER_FILTER_NEAREST; + op->base.mask.repeat = SAMPLER_EXTEND_NONE; + op->base.is_affine = TRUE; op->base.floats_per_vertex = 3; op->base.u.gen4.wm_kernel = WM_KERNEL; diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index db69f067..041e9186 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -1219,8 +1219,11 @@ gen5_emit_invariant(struct sna *sna) { /* Ironlake errata workaround: Before disabling the clipper, * you have to MI_FLUSH to get the pipeline idle. + * + * However, the kernel flushes the pipeline between batches, + * so we should be safe.... + * OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH); */ - OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH); OUT_BATCH(GEN5_PIPELINE_SELECT | PIPELINE_SELECT_3D); gen5_emit_sip(sna); @@ -2573,6 +2576,7 @@ gen5_render_fill(struct sna *sna, uint8_t alu, op->base.dst.height = dst->drawable.height; op->base.dst.format = sna_format_for_depth(dst->drawable.depth); op->base.dst.bo = dst_bo; + op->base.dst.x = op->base.dst.y = 0; op->base.src.bo = sna_render_get_solid(sna, @@ -2581,6 +2585,10 @@ gen5_render_fill(struct sna *sna, uint8_t alu, op->base.src.filter = SAMPLER_FILTER_NEAREST; op->base.src.repeat = SAMPLER_EXTEND_REPEAT; + op->base.mask.bo = NULL; + op->base.mask.filter = SAMPLER_FILTER_NEAREST; + op->base.mask.repeat = SAMPLER_EXTEND_NONE; + op->base.is_affine = TRUE; op->base.floats_per_vertex = 3; op->base.u.gen5.wm_kernel = WM_KERNEL; diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index fc2fc471..838819d1 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2793,6 +2793,7 @@ gen6_render_fill(struct sna *sna, uint8_t alu, op->base.dst.height = dst->drawable.height; op->base.dst.format = sna_format_for_depth(dst->drawable.depth); op->base.dst.bo = dst_bo; + op->base.dst.x = op->base.dst.y = 0; op->base.src.bo = sna_render_get_solid(sna, @@ -2801,6 +2802,10 @@ gen6_render_fill(struct sna *sna, uint8_t alu, op->base.src.filter = SAMPLER_FILTER_NEAREST; op->base.src.repeat = SAMPLER_EXTEND_REPEAT; + op->base.mask.bo = NULL; + op->base.mask.filter = SAMPLER_FILTER_NEAREST; + op->base.mask.repeat = SAMPLER_EXTEND_NONE; + op->base.is_affine = TRUE; op->base.floats_per_vertex = 3; op->base.floats_per_rect = 9; diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index ae773206..ccc00373 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2944,6 +2944,7 @@ gen7_render_fill(struct sna *sna, uint8_t alu, op->base.dst.height = dst->drawable.height; op->base.dst.format = sna_format_for_depth(dst->drawable.depth); op->base.dst.bo = dst_bo; + op->base.dst.x = op->base.dst.y = 0; op->base.src.bo = sna_render_get_solid(sna, @@ -2952,6 +2953,10 @@ gen7_render_fill(struct sna *sna, uint8_t alu, op->base.src.filter = SAMPLER_FILTER_NEAREST; op->base.src.repeat = SAMPLER_EXTEND_REPEAT; + op->base.mask.bo = NULL; + op->base.mask.filter = SAMPLER_FILTER_NEAREST; + op->base.mask.repeat = SAMPLER_EXTEND_NONE; + op->base.is_affine = TRUE; op->base.floats_per_vertex = 3; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 4b59b55b..5de1b571 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1740,7 +1740,7 @@ box_intersect(BoxPtr a, const BoxRec *b) return a->x1 < a->x2 && a->y1 < a->y2; } -static Bool +inline static bool sna_fill_init_blt(struct sna_fill_op *fill, struct sna *sna, PixmapPtr pixmap, @@ -1748,7 +1748,6 @@ sna_fill_init_blt(struct sna_fill_op *fill, uint8_t alu, uint32_t pixel) { - memset(fill, 0, sizeof(*fill)); return sna->render.fill(sna, alu, pixmap, bo, pixel, fill); } |