Mesa (main): llvmpipe/linear: don't try to use tgsi analysis for nir shaders

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 21 21:59:11 UTC 2021


Module: Mesa
Branch: main
Commit: ba7fd5b5614514e9c0fbb2e5020b6b40fefde847
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba7fd5b5614514e9c0fbb2e5020b6b40fefde847

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Mon Jul 19 04:01:50 2021 +0200

llvmpipe/linear: don't try to use tgsi analysis for nir shaders

Even though it's probably harmless, we shouldn't try it, so just skip it,
eventually need to hook in nir analysis there.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11969>

---

 src/gallium/drivers/llvmpipe/lp_state_fs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index cf36d2d14dc..12c42b0cd7d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -3833,7 +3833,10 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
    }
 
    /* This will put a derived copy of the tokens into shader->base.tokens */
-   llvmpipe_fs_analyse(shader, templ->tokens);
+   if (templ->type == PIPE_SHADER_IR_TGSI)
+     llvmpipe_fs_analyse(shader, templ->tokens);
+   else
+     shader->kind = LP_FS_KIND_GENERAL;
 
    return shader;
 }



More information about the mesa-commit mailing list