sna/blt: Optimise fill with GXcopy and pixel==0 to a GXclear

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-31 10:37:43 +00:00
parent 088728ad26
commit b4ab412cb3
1 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,8 @@ static bool sna_blt_fill_init(struct sna *sna,
if (alu == GXclear)
pixel = 0;
if (alu == GXcopy && pixel == 0)
alu = GXclear;
blt->br13 = 1<<31 | (fill_ROP[alu] << 16) | pitch;
switch (bpp) {
@ -1612,6 +1614,8 @@ Bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
if (alu == GXclear)
pixel = 0;
if (alu == GXcopy && pixel == 0)
alu = GXclear;
br13 |= 1<<31 | fill_ROP[alu] << 16;
switch (bpp) {