nv50: don't try to upload MSAA settings for BUFFER textures
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 3 Apr 2020 01:53:02 +0000 (21:53 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 3 Apr 2020 13:00:08 +0000 (13:00 +0000)
commit1288ac7632b31a20497a0e75f374f66ce3d5bc3c
treec0ac68d37aa46226a51ee45cab456079a0eea28e
parentb38c32a57380c228813ec59823fd5510ee93ce4c
nv50: don't try to upload MSAA settings for BUFFER textures

We need the MSAA scaling parameters to properly fetch samples from MSAA
textures. These are stored in the miptree which wraps all regular
textures. However it does not wrap buffer textures, so make sure to skip
them rather than accessing out-of-bounds or unmapped memory.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2727
Fixes: 3bd40073b98 ("nv50: add support for texelFetch'ing MS textures")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4424>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4424>
src/gallium/drivers/nouveau/nv50/nv50_tex.c