SVGA3dSize base_level_size;
uint32 numMipLevels;
uint32 arraySize;
+ uint32 numSamples;
if (res->target == PIPE_BUFFER) {
format = SVGA3D_BUFFER;
base_level_size.depth = 1;
numMipLevels = 1;
arraySize = 1;
+ numSamples = 0;
} else {
if (res->target == PIPE_TEXTURE_CUBE)
base_level_size.depth = res->depth0;
numMipLevels = res->last_level + 1;
arraySize = res->array_size;
+ numSamples = res->nr_samples;
}
return sws->surface_can_create(sws, format, base_level_size,
- arraySize, numMipLevels);
+ arraySize, numMipLevels, numSamples);
}
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;
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;
}