[Mesa-dev] [PATCH] svga: add missing padding to SVGA3dSize

Van Der Wath, DanielX J danielx.j.van.der.wath at intel.com
Fri Feb 20 01:22:20 PST 2015


From: Daniel van der Wath <danielx.j.van.der.wath at intel.com>

The kernel side equivalent of struct SVGA3dSize (struct drm_vmw_size) has an
extra padding word that SVGA3dSize lacks. This was causing data to be written
past the end of "size" in vmw_drm_surface_from_handle(), corrupting other data
and in this case leading to Weston being unable to render anything on screen.
---
 src/gallium/drivers/svga/include/svga3d_types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/svga/include/svga3d_types.h b/src/gallium/drivers/svga/include/svga3d_types.h
index fc4a6b9..3ce6814 100644
--- a/src/gallium/drivers/svga/include/svga3d_types.h
+++ b/src/gallium/drivers/svga/include/svga3d_types.h
@@ -1280,6 +1280,7 @@ struct {
    uint32               width;
    uint32               height;
    uint32               depth;
+   uint32               pad64;
 }
 #include "vmware_pack_end.h"
 SVGA3dSize;
-- 
1.7.11.7



More information about the mesa-dev mailing list