From: Ilia Mirkin Date: Fri, 3 Apr 2020 01:53:02 +0000 (-0400) Subject: nv50: don't try to upload MSAA settings for BUFFER textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1288ac7632b31a20497a0e75f374f66ce3d5bc3c;p=mesa.git 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 Cc: mesa-stable@lists.freedesktop.org Tested-by: Marge Bot Part-of: --- 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;