<div dir="ltr">Just tried this out, on your XA branch, and I'm getting rendering<div>issues in gnome-terminal. It looks like some text is offset by</div><div>one or two lines, and the rest looks a bit like pitch issues.<div>
<br></div><div><a href="http://i.imgur.com/mdivF0q.png">http://i.imgur.com/mdivF0q.png</a></div><div><br></div><div>I can't really see anything in the patch that would cause this,</div><div>going to take a extra look at the xa patches on the mesa sida.<br>
<div><br></div><div style>Cheers, Jakob.</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 7:31 PM, Rob Clark <span dir="ltr"><<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Only just compile tested, as I don't have the "hardware" for it..<br>
<br>
Signed-off-by: Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>><br>
---<br>
<a href="http://configure.ac" target="_blank">configure.ac</a> | 2 +-<br>
vmwgfx/vmwgfx_dri2.c | 5 +++--<br>
vmwgfx/vmwgfx_driver.c | 3 ++-<br>
vmwgfx/vmwgfx_saa.c | 20 ++++++++++++++------<br>
vmwgfx/vmwgfx_tex_video.c | 5 +++--<br>
5 files changed, 23 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/<a href="http://configure.ac" target="_blank">configure.ac</a> b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
index 0631bcc..dccfb27 100644<br>
--- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
@@ -118,7 +118,7 @@ if test x$BUILD_VMWGFX = xyes; then<br>
PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])<br>
fi<br>
if test x$BUILD_VMWGFX = xyes; then<br>
- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],[],[BUILD_VMWGFX=no])<br>
+ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 2.0.0],[],[BUILD_VMWGFX=no])<br>
fi<br>
<br>
DRIVER_NAME=vmware<br>
diff --git a/vmwgfx/vmwgfx_dri2.c b/vmwgfx/vmwgfx_dri2.c<br>
index 7de0772..2f007f0 100644<br>
--- a/vmwgfx/vmwgfx_dri2.c<br>
+++ b/vmwgfx/vmwgfx_dri2.c<br>
@@ -201,7 +201,8 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer, unsigned int for<br>
}<br>
<br>
private->srf = srf;<br>
- if (xa_surface_handle(srf, &buffer->name, &buffer->pitch) != 0)<br>
+ if (xa_surface_handle(srf, xa_handle_type_shared,<br>
+ &buffer->name, &buffer->pitch) != 0)<br>
return FALSE;<br>
<br>
buffer->cpp = xa_format_depth(xa_surface_format(srf)) / 8;<br>
@@ -222,7 +223,7 @@ dri2_do_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer)<br>
struct vmwgfx_saa_pixmap *vpix = vmwgfx_saa_pixmap(private->pPixmap);<br>
<br>
if (--private->refcount == 0 && srf) {<br>
- xa_surface_destroy(srf);<br>
+ xa_surface_unref(srf);<br>
}<br>
<br>
/*<br>
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c<br>
index 7863ba2..3002285 100644<br>
--- a/vmwgfx/vmwgfx_driver.c<br>
+++ b/vmwgfx/vmwgfx_driver.c<br>
@@ -617,7 +617,8 @@ vmwgfx_scanout_present(ScreenPtr pScreen, int drm_fd,<br>
return FALSE;<br>
}<br>
<br>
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0) {<br>
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared,<br>
+ &handle, &dummy) != 0) {<br>
LogMessage(X_ERROR, "Could not get present surface handle.\n");<br>
return FALSE;<br>
}<br>
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c<br>
index 63df3a1..ed3c1ee 100644<br>
--- a/vmwgfx/vmwgfx_saa.c<br>
+++ b/vmwgfx/vmwgfx_saa.c<br>
@@ -140,7 +140,7 @@ vmwgfx_pixmap_free_storage(struct vmwgfx_saa_pixmap *vpix)<br>
vpix->malloc = NULL;<br>
}<br>
if (!(vpix->backing & VMWGFX_PIX_SURFACE) && vpix->hw) {<br>
- xa_surface_destroy(vpix->hw);<br>
+ xa_surface_unref(vpix->hw);<br>
vpix->hw = NULL;<br>
}<br>
if (!(vpix->backing & VMWGFX_PIX_GMR) && vpix->gmr) {<br>
@@ -286,7 +286,8 @@ vmwgfx_saa_dma(struct vmwgfx_saa *vsaa,<br>
if (vpix->gmr && vsaa->can_optimize_dma) {<br>
uint32_t handle, dummy;<br>
<br>
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0)<br>
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared,<br>
+ &handle, &dummy) != 0)<br>
goto out_err;<br>
if (vmwgfx_dma(0, 0, reg, vpix->gmr, pixmap->devKind, handle,<br>
to_hw) != 0)<br>
@@ -305,6 +306,8 @@ vmwgfx_saa_dma(struct vmwgfx_saa *vsaa,<br>
(int) to_hw,<br>
(struct xa_box *) REGION_RECTS(reg),<br>
REGION_NUM_RECTS(reg));<br>
+ if (to_hw)<br>
+ xa_context_flush(vsaa->xa_ctx);<br>
if (vpix->gmr)<br>
vmwgfx_dmabuf_unmap(vpix->gmr);<br>
if (ret)<br>
@@ -441,7 +444,7 @@ vmwgfx_hw_kill(struct vmwgfx_saa *vsaa,<br>
&spix->dirty_hw))<br>
return FALSE;<br>
<br>
- xa_surface_destroy(vpix->hw);<br>
+ xa_surface_unref(vpix->hw);<br>
vpix->hw = NULL;<br>
<br>
/*<br>
@@ -683,7 +686,8 @@ vmwgfx_present_prepare(struct vmwgfx_saa *vsaa,<br>
<br>
(void) pScreen;<br>
if (src_vpix == dst_vpix || !src_vpix->hw ||<br>
- xa_surface_handle(src_vpix->hw, &vsaa->src_handle, &dummy) != 0)<br>
+ xa_surface_handle(src_vpix->hw, xa_handle_type_shared,<br>
+ &vsaa->src_handle, &dummy) != 0)<br>
return FALSE;<br>
<br>
REGION_NULL(pScreen, &vsaa->present_region);<br>
@@ -784,7 +788,7 @@ vmwgfx_create_hw(struct vmwgfx_saa *vsaa,<br>
return TRUE;<br>
<br>
out_no_damage:<br>
- xa_surface_destroy(hw);<br>
+ xa_surface_unref(hw);<br>
return FALSE;<br>
}<br>
<br>
@@ -929,6 +933,7 @@ vmwgfx_copy_prepare(struct saa_driver *driver,<br>
<br>
if (!vmwgfx_hw_validate(src_pixmap, src_reg)) {<br>
xa_copy_done(vsaa->xa_ctx);<br>
+ xa_context_flush(vsaa->xa_ctx);<br>
return FALSE;<br>
}<br>
<br>
@@ -1029,6 +1034,7 @@ vmwgfx_copy_done(struct saa_driver *driver)<br>
return;<br>
}<br>
xa_copy_done(vsaa->xa_ctx);<br>
+ xa_context_flush(vsaa->xa_ctx);<br>
}<br>
<br>
static Bool<br>
@@ -1175,6 +1181,7 @@ vmwgfx_composite_done(struct saa_driver *driver)<br>
struct vmwgfx_saa *vsaa = to_vmwgfx_saa(driver);<br>
<br>
xa_composite_done(vsaa->xa_ctx);<br>
+ xa_context_flush(vsaa->xa_ctx);<br>
}<br>
<br>
static void<br>
@@ -1436,7 +1443,8 @@ vmwgfx_scanout_ref(struct vmwgfx_screen_entry *entry)<br>
*/<br>
if (!vmwgfx_hw_accel_validate(pixmap, 0, XA_FLAG_SCANOUT, 0, NULL))<br>
goto out_err;<br>
- if (xa_surface_handle(vpix->hw, &handle, &dummy) != 0)<br>
+ if (xa_surface_handle(vpix->hw, xa_handle_type_shared,<br>
+ &handle, &dummy) != 0)<br>
goto out_err;<br>
depth = xa_format_depth(xa_surface_format(vpix->hw));<br>
<br>
diff --git a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c<br>
index 449266b..2971ed7 100644<br>
--- a/vmwgfx/vmwgfx_tex_video.c<br>
+++ b/vmwgfx/vmwgfx_tex_video.c<br>
@@ -199,7 +199,7 @@ stop_video(ScrnInfoPtr pScrn, pointer data, Bool shutdown)<br>
<br>
for (i=0; i<3; ++i) {<br>
if (priv->yuv[i]) {<br>
- xa_surface_destroy(priv->yuv[i]);<br>
+ xa_surface_unref(priv->yuv[i]);<br>
priv->yuv[i] = NULL;<br>
}<br>
for (j=0; j<2; ++j) {<br>
@@ -539,7 +539,8 @@ copy_packed_data(ScrnInfoPtr pScrn,<br>
REGION_RESET(pScrn->pScreen, ®, &box);<br>
}<br>
<br>
- if (xa_surface_handle(srf, &handle, &stride) != 0) {<br>
+ if (xa_surface_handle(srf, xa_handle_type_shared,<br>
+ &handle, &stride) != 0) {<br>
ret = BadAlloc;<br>
break;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>