diff options
author | Charmaine Lee <[email protected]> | 2016-09-12 14:21:40 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-09-17 10:24:12 -0600 |
commit | 2a4b019239ea74c5573322881d663529bfd8191a (patch) | |
tree | 127f95aa969a7c700960ae6582ac7790534a3082 /src/gallium/drivers/svga/svga_surface.c | |
parent | 5947d9083038683618eb69c9e624e185069df794 (diff) |
svga: single sample surface can be created as non-multisamples surface
With this patch, single sample surface will be created as non-multisamples
surface.
Tested with piglit, glretrace.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 81b0f48e53e..42636bc82fe 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -134,7 +134,9 @@ svga_texture_view_surface(struct svga_context *svga, key->cachable = 1; key->arraySize = 1; key->numFaces = 1; - key->sampleCount = tex->b.b.nr_samples; + + /* single sample surface can be treated as non-multisamples surface */ + key->sampleCount = tex->b.b.nr_samples > 1 ? tex->b.b.nr_samples : 0; if (key->sampleCount > 1) { key->flags |= SVGA3D_SURFACE_MASKABLE_ANTIALIAS; |