[PATCH xserver] exa: Use PictureMatchFormat for source-only picture format description

Michel Dänzer michel at daenzer.net
Thu Jun 7 07:23:14 UTC 2018


On 2018-06-06 10:26 PM, Adam Jackson wrote:
> On Fri, 2018-06-01 at 11:58 +0200, Michel Dänzer wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> Their pFormat member is NULL, which resulted in a crash in
>> miRenderColorToPixel.
>>
>> Fixes: 8171d4c2d67b "render: Store and use all 16bpc of precision for
>>                      solid pixels (v2.1)"
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> 
> I'm not entirely sure why a source-only picture would have ->format but
> not ->pFormat?

static PicturePtr
createSourcePicture(void)
{
    [...]
    pPicture->pFormat = 0;
    [...]
    pPicture->format = PICT_a8r8g8b8;
    [...]
}

The immediate issue is that getting the PictFormatPtr requires the
ScreenPtr, which isn't readily available here. Probably solvable, but
not trivial, so I consider it a SEP. :)


> Still, if that's the case, this would definitely be a correct fix, so.
> 
> Reviewed-by: Adam Jackson <ajax at redhat.com>

Thanks!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list