diff options
author | Charmaine Lee <[email protected]> | 2017-06-01 15:12:14 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-09-05 11:22:42 -0600 |
commit | 49678e9e49fd53000b265904ccabca08b64c4583 (patch) | |
tree | 55f03c3c242e229471fae855e41a2693e06b6554 /src/gallium/winsys/svga | |
parent | 4310649ccb37481fd0f15ab0c826ed626bf81caa (diff) |
svga: sync with upstream changes to surface flags
SVGA device now supports 64 bits surface flags. This patch
updates the winsys interface to allow 64 bits surface flags.
The linux winsys layer will for now only honor the lower 32 bits of
the surface flags.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/winsys/svga')
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen.h | 6 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_dri.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 6 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_svga.c | 7 |
4 files changed, 13 insertions, 8 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h index f21cabb51f9..ea4d2e453be 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen.h +++ b/src/gallium/winsys/svga/drm/vmw_screen.h @@ -128,7 +128,7 @@ vmw_ioctl_context_destroy(struct vmw_winsys_screen *vws, uint32 vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, - SVGA3dSurfaceFlags flags, + SVGA3dSurface1Flags flags, SVGA3dSurfaceFormat format, unsigned usage, SVGA3dSize size, @@ -137,7 +137,7 @@ vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, unsigned sampleCount); uint32 vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws, - SVGA3dSurfaceFlags flags, + SVGA3dSurface1Flags flags, SVGA3dSurfaceFormat format, unsigned usage, SVGA3dSize size, @@ -150,7 +150,7 @@ vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws, int vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws, const struct winsys_handle *whandle, - SVGA3dSurfaceFlags *flags, + SVGA3dSurface1Flags *flags, SVGA3dSurfaceFormat *format, uint32_t *numMipLevels, uint32_t *handle, diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c index 76f29e2aced..4dbac43d314 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c @@ -146,7 +146,7 @@ vmw_drm_gb_surface_from_handle(struct svga_winsys_screen *sws, struct vmw_svga_winsys_surface *vsrf; struct svga_winsys_surface *ssrf; struct vmw_winsys_screen *vws = vmw_winsys_screen(sws); - SVGA3dSurfaceFlags flags; + SVGA3dSurface1Flags flags; uint32_t mip_levels; struct vmw_buffer_desc desc; struct pb_manager *provider = vws->pools.gmr; diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c index 99f8f42107e..cb2eb1b4936 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c @@ -131,7 +131,7 @@ vmw_ioctl_context_destroy(struct vmw_winsys_screen *vws, uint32 cid) uint32 vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, - SVGA3dSurfaceFlags flags, + SVGA3dSurface1Flags flags, SVGA3dSurfaceFormat format, unsigned usage, SVGA3dSize size, @@ -193,7 +193,7 @@ vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, uint32 vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws, - SVGA3dSurfaceFlags flags, + SVGA3dSurface1Flags flags, SVGA3dSurfaceFormat format, unsigned usage, SVGA3dSize size, @@ -342,7 +342,7 @@ vmw_ioctl_surface_req(const struct vmw_winsys_screen *vws, int vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws, const struct winsys_handle *whandle, - SVGA3dSurfaceFlags *flags, + SVGA3dSurface1Flags *flags, SVGA3dSurfaceFormat *format, uint32_t *numMipLevels, uint32_t *handle, diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index 27a8b070166..9decf0c7053 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -170,7 +170,7 @@ vmw_svga_winsys_fence_server_sync(struct svga_winsys_screen *sws, static struct svga_winsys_surface * vmw_svga_winsys_surface_create(struct svga_winsys_screen *sws, - SVGA3dSurfaceFlags flags, + SVGA3dSurfaceAllFlags allflags, SVGA3dSurfaceFormat format, unsigned usage, SVGA3dSize size, @@ -184,6 +184,11 @@ vmw_svga_winsys_surface_create(struct svga_winsys_screen *sws, struct pb_manager *provider; uint32_t buffer_size; + /* Until the kernel supports 64 bits surface flag, the linux driver + * only honors the lower 32 bits of the surface flag. + */ + SVGA3dSurface1Flags flags = (SVGA3dSurface1Flags)allflags; + memset(&desc, 0, sizeof(desc)); surface = CALLOC_STRUCT(vmw_svga_winsys_surface); if(!surface) |