OSDN Git Service

dri_interface: add put shm image2 (v2)
authorDave Airlie <airlied@redhat.com>
Thu, 27 Dec 2018 04:26:04 +0000 (14:26 +1000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 29 Jan 2019 17:44:27 +0000 (17:44 +0000)
commit2733d26011f099f13cab4cf80bde85d7ad538846
treeca1c129d91bd4384c41788273f7b69e34d39bb33
parent8a6c154496452fe6273e7c0e78fa7c70e8ddbed0
dri_interface: add put shm image2 (v2)

This adds a new interface to the swrast interface to fix an shm put image bug.

The current code adds the x,y src offsets into the offset parameters,
however if the x offset is > 0, and the put image copies up to the height
of the image, this can trigger an X server validation check to fail and
the renderering to get BadMatch.

This patch fixes it to pass the x offset coord in as a src x.

We cannot pass the Y coordinate due to the horrible code mangling the
image w/h vs stride in swrastXPutImage.

v2: drop srcx,y from api

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit db83a2b40f95fa3b9a741e9797dbf3e18f065a71)
include/GL/internal/dri_interface.h