sna: Fix analysis of source extents for BLT composite

After we have computed the source offset vector for the transformed
source bo, we need to use that with respect to the destination rectangle
to verify that the source sample is wholly within bounds.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-09-13 22:10:08 +01:00
parent 6c7f998f7b
commit 3fbdedbf9d
8 changed files with 6 additions and 20 deletions

View File

@ -1780,9 +1780,7 @@ gen2_render_composite(struct sna *sna,
case 1:
if (mask == NULL && tmp->src.bo &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;
break;

View File

@ -2868,9 +2868,7 @@ gen3_render_composite(struct sna *sna,
case 1:
if (mask == NULL && tmp->src.bo &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;

View File

@ -2315,9 +2315,7 @@ gen4_render_composite(struct sna *sna,
case 1:
if (mask == NULL &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;

View File

@ -2330,9 +2330,7 @@ gen5_render_composite(struct sna *sna,
case 1:
if (mask == NULL &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;

View File

@ -2708,9 +2708,7 @@ gen6_render_composite(struct sna *sna,
if (mask == NULL &&
prefer_blt_composite(sna, tmp) &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;

View File

@ -2811,9 +2811,7 @@ gen7_render_composite(struct sna *sna,
if (mask == NULL &&
prefer_blt_composite(sna, tmp) &&
sna_blt_composite__convert(sna,
src_x, src_y,
width, height,
dst_x, dst_y,
dst_x, dst_y, width, height,
tmp))
return true;

View File

@ -1914,7 +1914,6 @@ bool
sna_blt_composite__convert(struct sna *sna,
int x, int y,
int width, int height,
int dst_x, int dst_y,
struct sna_composite_op *tmp)
{
uint32_t alpha_fixup;

View File

@ -574,7 +574,6 @@ bool sna_blt_composite(struct sna *sna,
bool sna_blt_composite__convert(struct sna *sna,
int x, int y,
int width, int height,
int dst_x, int dst_y,
struct sna_composite_op *tmp);
bool sna_blt_fill(struct sna *sna, uint8_t alu,