<div dir="ltr">Sure, I'll give it a try later. Currently I am working on my day job.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 4:25 PM, Russell King - ARM Linux <span dir="ltr"><<a href="mailto:linux@armlinux.org.uk" target="_blank">linux@armlinux.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Nov 03, 2017 at 12:05:48PM +0000, Luís Mendes wrote:<br>
> So this is what I get with picture desc on the candidate corner cases:<br>
> Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0],<br>
> vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>
> Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x20e45a8: 32<br>
> (1024x768+0+0) R fmt XRGB8888<br>
<br>
</span>I have my own case with mate here:<br>
<br>
etnaviv_accel_Composite(<wbr>height=1, width=1,<br>
yDst=0, xDst=0, yMask=0, xMask=0, ySrc=-1, xSrc=-1,<br>
pDst=0x962b08, pMask=0x0, pSrc=0x962ab8, op=PictOpSrc)<br>
<br>
pSrc = {pDrawable = 0x86cf48, pFormat = 0x59bd78, format = PICT_x8r8g8b8,<br>
refcnt = 1, id = 0, repeat = 0, graphicsExposures = 0, subWindowMode = 1,<br>
polyEdge = 0, polyMode = 0, freeCompClip = 1, componentAlpha = 0,<br>
repeatType = 0, filter = 0, stateChanges = 0, unused = 0, pNext = 0x0,<br>
alphaMap = 0x0, alphaOrigin = {x = 0, y = 0}, clipOrigin = {x = 0, y = 0},<br>
clientClip = 0x0, serialNumber = 4071, pCompositeClip = 0x962b58,<br>
devPrivates = 0x0, transform = 0x0, pSourcePict = 0x0, filter_params = 0x0,<br>
filter_nparams = 0}<br>
<br>
pSrc->pDrawable = {type = 0, class = 1, depth = 24, bitsPerPixel = 32,<br>
id = 27262979, x = 1334, y = 0, width = 1, height = 25,<br>
pScreen = 0x599708, serialNumber = 4071}<br>
=> DRAWABLE_WINDOW<br>
<br>
pSrc::Pixmap = {drawable = {type = 1, class = 0, depth = 24,<br>
bitsPerPixel = 32, id = 0, x = 0, y = 0, width = 1360, height = 27,<br>
pScreen = 0x599708, serialNumber = 499}, devPrivates = 0x84bd0c,<br>
refcnt = 3, devKind = 5440, devPrivate = {ptr = 0x84bd48, val = 8699208,<br>
uval = 8699208, fptr = 0x84bd48}, screen_x = 0, screen_y = 0,<br>
usage_hint = 536870914, master_pixmap = 0x0}<br>
<br>
So, what's being asked for is to copy a single pixel from -1,-1 on the<br>
source picture to 0,0 on the destination picture.<br>
<br>
The source picture is a window, with no repeat. The backing pixmap for<br>
the window is 1360x27. The window is located at 1334,0 on this pixmap.<br>
<br>
So, -1,-1 is off the top of the window, and off the top of the pixmap.<br>
<br>
>From what I can tell from the Xrender spec<br>
(<a href="https://www.x.org/releases/current/doc/renderproto/renderproto.txt" rel="noreferrer" target="_blank">https://www.x.org/releases/<wbr>current/doc/renderproto/<wbr>renderproto.txt</a>),<br>
this should mean, as repeat mode is "None", that the source should be<br>
treated as "transparent".<br>
<br>
Hmm, let's try to trap the case where the pixels we're asked for are off<br>
the pixmap, and use the fallback. Can you try this patch please?<br>
<br>
diff --git a/etnaviv/etnaviv_render.c b/etnaviv/etnaviv_render.c<br>
index 15cafdf..e846a23 100644<br>
--- a/etnaviv/etnaviv_render.c<br>
+++ b/etnaviv/etnaviv_render.c<br>
@@ -125,24 +125,27 @@ static void etnaviv_debug_blend_op(const char *func,<br>
* determine whether the picture repeat flag is meaningful. The<br>
* rectangle must have had the transformation applied.<br>
*/<br>
-static Bool picture_needs_repeat(<wbr>PicturePtr pPict, int x, int y,<br>
+static Bool picture_has_pixels(PicturePtr pPict, int x, int y,<br>
unsigned w, unsigned h)<br>
{<br>
DrawablePtr pDrawable;<br>
<br>
- if (!pPict->repeat)<br>
- return FALSE;<br>
-<br>
pDrawable = pPict->pDrawable;<br>
if (!pDrawable)<br>
+ return FALSE;<br>
+<br>
+ if (!drawable_contains(pDrawable, x, y, w, h))<br>
+ return FALSE;<br>
+<br>
+ if (!pPict->repeat)<br>
return TRUE;<br>
<br>
if (pPict->filter != PictFilterConvolution &&<br>
(pDrawable->width > 1 || pDrawable->height > 1) &&<br>
drawable_contains(pDrawable, x, y, w, h))<br>
- return FALSE;<br>
+ return TRUE;<br>
<br>
- return TRUE;<br>
+ return FALSE;<br>
}<br>
<br>
static const struct etnaviv_blend_op etnaviv_composite_op[] = {<br>
@@ -425,8 +428,8 @@ static struct etnaviv_pixmap *etnaviv_acquire_src(ScreenPtr pScreen,<br>
<span class=""> if (!transform_is_integer_<wbr>translation(pict->transform, &tx, &ty))<br>
goto fallback;<br>
<br>
</span>- if (picture_needs_repeat(pict, src_topleft->x + tx, src_topleft->y + ty,<br>
- clip->x2, clip->y2))<br>
+ if (!picture_has_pixels(pict, src_topleft->x + tx, src_topleft->y + ty,<br>
+ clip->x2, clip->y2))<br>
<span class=""> goto fallback;<br>
<br>
src_topleft->x += drawable->x + src_offset.x + tx;<br>
</span>@@ -661,8 +664,8 @@ static int etnaviv_accel_composite_<wbr>masked(PicturePtr pSrc, PicturePtr pMask,<br>
mask_offset.y += ty;<br>
<br>
/* We don't handle mask repeats (yet) */<br>
- if (picture_needs_repeat(pMask, mask_offset.x, mask_offset.y,<br>
- clip_temp.x2, clip_temp.y2))<br>
+ if (!picture_has_pixels(pMask, mask_offset.x, mask_offset.y,<br>
+ clip_temp.x2, clip_temp.y2))<br>
goto fallback;<br>
<br>
mask_offset.x += pMask->pDrawable->x;<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
RMK's Patch system: <a href="http://www.armlinux.org.uk/developer/patches/" rel="noreferrer" target="_blank">http://www.armlinux.org.uk/<wbr>developer/patches/</a><br>
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up<br>
According to <a href="http://speedtest.net" rel="noreferrer" target="_blank">speedtest.net</a>: 8.21Mbps down 510kbps up<br>
</div></div></blockquote></div><br></div>