From: Daniel van der Wath <danielx.j.van.der.w...@intel.com>

The value stored in "handle" is trashed before being copied into the
surface's sid. Use the original value from "whandle->handle" instead.
This fixes a bug with Weston running on VMWare, where SVGA3D_SetRenderTarget()
would fail and prevent anything from being drawn on screen.

Reviewed-by: Satyeshwar Singh <satyeshwar.si...@intel.com>
---
 src/gallium/winsys/svga/drm/vmw_screen_dri.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c 
b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
index 79a1b3e..0f796c4 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
@@ -319,7 +319,7 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
     pipe_reference_init(&vsrf->refcnt, 1);
     p_atomic_set(&vsrf->validated, 0);
     vsrf->screen = vws;
-    vsrf->sid = handle;
+    vsrf->sid = whandle->handle;
     ssrf = svga_winsys_surface(vsrf);
     *format = rep->format;
 
-- 
1.7.11.7

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to