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/drivers/svga | |
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/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_winsys.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c index 874cfa07223..b9dca1ede2b 100644 --- a/src/gallium/drivers/svga/svga_resource.c +++ b/src/gallium/drivers/svga/svga_resource.c @@ -85,6 +85,7 @@ svga_can_create_resource(struct pipe_screen *screen, SVGA3dSize base_level_size; uint32 numMipLevels; uint32 arraySize; + uint32 numSamples; if (res->target == PIPE_BUFFER) { format = SVGA3D_BUFFER; @@ -93,6 +94,7 @@ svga_can_create_resource(struct pipe_screen *screen, base_level_size.depth = 1; numMipLevels = 1; arraySize = 1; + numSamples = 0; } else { if (res->target == PIPE_TEXTURE_CUBE) @@ -107,10 +109,11 @@ svga_can_create_resource(struct pipe_screen *screen, 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); } diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index e8fe3e205a9..a067a7ba09d 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -583,7 +583,8 @@ struct svga_winsys_screen SVGA3dSurfaceFormat format, SVGA3dSize size, uint32 numLayers, - uint32 numMipLevels); + uint32 numMipLevels, + uint32 numSamples); /** * Buffer management. Buffer attributes are mostly fixed over its lifetime. |