summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_saa.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2013-12-05 02:58:47 -0800
committerThomas Hellstrom <thellstrom@vmware.com>2013-12-06 05:24:37 -0800
commita40cbd7b4fa19219849b4b0a48f07538772c3e22 (patch)
tree56c820c7053e9053be92f46bf12725edb31af5c4 /vmwgfx/vmwgfx_saa.c
parent7ac45326eccbf3bea9a4a8f95b9662a36ab58eb0 (diff)
vmwgfx: Support also XA version 1 v2
We need to support also XA version 1, since we want to be backwards compatible with older mesa releases. Unfortunately, the intended way of detecting XA major version at compile-time was broken on mesa 10 so we need a workaround that tests for XA version 2 at config time. v2: Update the test for XA version 2. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'vmwgfx/vmwgfx_saa.c')
-rw-r--r--vmwgfx/vmwgfx_saa.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index 346e7f4..1459933 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -146,7 +146,7 @@ vmwgfx_pixmap_free_storage(struct vmwgfx_saa_pixmap *vpix)
vpix->malloc = NULL;
}
if (!(vpix->backing & VMWGFX_PIX_SURFACE) && vpix->hw) {
- xa_surface_unref(vpix->hw);
+ xa_surface_destroy(vpix->hw);
vpix->hw = NULL;
}
if (!(vpix->backing & VMWGFX_PIX_GMR) && vpix->gmr) {
@@ -451,7 +451,7 @@ vmwgfx_hw_kill(struct vmwgfx_saa *vsaa,
&spix->dirty_hw))
return FALSE;
- xa_surface_unref(vpix->hw);
+ xa_surface_destroy(vpix->hw);
vpix->hw = NULL;
/*
@@ -698,8 +698,7 @@ vmwgfx_present_prepare(struct vmwgfx_saa *vsaa,
(void) pScreen;
if (src_vpix == dst_vpix || !src_vpix->hw ||
- xa_surface_handle(src_vpix->hw, xa_handle_type_shared,
- &vsaa->src_handle, &dummy) != 0)
+ _xa_surface_handle(src_vpix->hw, &vsaa->src_handle, &dummy) != 0)
return FALSE;
REGION_NULL(pScreen, &vsaa->present_region);
@@ -800,7 +799,7 @@ vmwgfx_create_hw(struct vmwgfx_saa *vsaa,
return TRUE;
out_no_damage:
- xa_surface_unref(hw);
+ xa_surface_destroy(hw);
return FALSE;
}
@@ -1459,8 +1458,7 @@ vmwgfx_scanout_ref(struct vmwgfx_screen_entry *entry)
*/
if (!vmwgfx_hw_accel_validate(pixmap, 0, XA_FLAG_SCANOUT, 0, NULL))
goto out_err;
- if (xa_surface_handle(vpix->hw, xa_handle_type_shared,
- &handle, &dummy) != 0)
+ if (_xa_surface_handle(vpix->hw, &handle, &dummy) != 0)
goto out_err;
depth = xa_format_depth(xa_surface_format(vpix->hw));