diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 2086afab52a..484a24049d9 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -841,7 +841,9 @@ svga_texture_create(struct pipe_screen *screen, tex->key.size.depth = template->depth0; tex->key.arraySize = 1; tex->key.numFaces = 1; - tex->key.sampleCount = template->nr_samples; + + /* single sample texture can be treated as non-multisamples texture */ + tex->key.sampleCount = template->nr_samples > 1 ? template->nr_samples : 0; if (template->nr_samples > 1) { tex->key.flags |= SVGA3D_SURFACE_MASKABLE_ANTIALIAS; 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; |