With this patch, single sample surface will be created as non-multisamples
surface.
Tested with piglit, glretrace.
Reviewed-by: Brian Paul <brianp@vmware.com>
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;
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;