diff options
author | Charmaine Lee <[email protected]> | 2017-09-26 16:23:58 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-09-10 13:07:30 -0600 |
commit | 8088cb6f53ddf6313fefce2789f657e595f3a489 (patch) | |
tree | 637241e4bc8eb0fd78460af9c94ad53bf5356b28 /src/gallium/winsys/svga/drm | |
parent | 4a1976bfcf4b4843369aa9146af48ac8bf9e70d8 (diff) |
svga: add sample count to the surface_can_create interface
With this patch, sample count is also taken into account
when determining if a resource can be created.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/winsys/svga/drm')
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_svga.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index 9decf0c7053..0157f60c855 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -309,7 +309,8 @@ vmw_svga_winsys_surface_can_create(struct svga_winsys_screen *sws, SVGA3dSurfaceFormat format, SVGA3dSize size, uint32 numLayers, - uint32 numMipLevels) + uint32 numMipLevels, + uint32 numSamples) { struct vmw_winsys_screen *vws = vmw_winsys_screen(sws); uint32_t buffer_size; @@ -317,6 +318,9 @@ vmw_svga_winsys_surface_can_create(struct svga_winsys_screen *sws, buffer_size = svga3dsurface_get_serialized_size(format, size, numMipLevels, numLayers); + if (numSamples > 1) + buffer_size *= numSamples; + if (buffer_size > vws->ioctl.max_texture_size) { return FALSE; } |