summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-04-23 14:47:31 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-04-23 14:47:31 +0100
commitf3c7d6ff866cdd96cdd55baee94f58698a9656a3 (patch)
tree0a317a9e994b7810b08624f135c4256732f26766 /src
parente0da812c5bdb7ffdd3450f614a4b73e44cd7feca (diff)
gallium: Handle non-NULL data pointer in EXA ModifyPixmapHeader hook.
Need to use the data pointed to for pixmap contents in that case. Fixes RENDER based text rendering.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index d743e1e300..7913174354 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -37,6 +37,8 @@
#include "pipe/p_state.h"
#include "pipe/p_inlines.h"
+#include "util/u_rect.h"
+
struct exa_entity
{
ExaDriverPtr pExa;
@@ -436,6 +438,18 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
priv->tex = exa->scrn->texture_create(exa->scrn, &template);
}
+ if (pPixData) {
+ struct pipe_transfer *transfer =
+ exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0,
+ PIPE_TRANSFER_WRITE,
+ 0, 0, width, height);
+ pipe_copy_rect(exa->scrn->transfer_map(exa->scrn, transfer),
+ &priv->tex->block, transfer->stride, 0, 0,
+ width, height, pPixData, pPixmap->devKind, 0, 0);
+ exa->scrn->transfer_unmap(exa->scrn, transfer);
+ exa->scrn->tex_transfer_destroy(transfer);
+ }
+
return TRUE;
}