Mesa (master): nv50: don't try to upload MSAA settings for BUFFER textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 3 13:11:06 UTC 2020


Module: Mesa
Branch: master
Commit: 1288ac7632b31a20497a0e75f374f66ce3d5bc3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1288ac7632b31a20497a0e75f374f66ce3d5bc3c

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Thu Apr  2 21:53:02 2020 -0400

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 at alum.mit.edu>
Cc: mesa-stable at 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_tex.c b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
index a9bf6c023d8..3f51c53e967 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
@@ -315,7 +315,7 @@ nv50_validate_tic(struct nv50_context *nv50, int s)
          struct nv50_tic_entry *tic = nv50_tic_entry(nv50->textures[s][i]);
          struct nv50_miptree *res;
 
-         if (!tic) {
+         if (!tic || tic->pipe.target == PIPE_BUFFER) {
             PUSH_DATA (push, 0);
             PUSH_DATA (push, 0);
             continue;



More information about the mesa-commit mailing list