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>
This commit is contained in:
parent
7e7759db4c
commit
c2040fb8e6
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue