r600: don't try to serialized shaders translated from TGSI
authorGert Wollny <gert.wollny@collabora.com>
Thu, 15 Dec 2022 14:23:48 +0000 (15:23 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 13:39:55 +0000 (13:39 +0000)
TTN seems to have a problem encoding vec4[4] correctly, so that
serialization might fail.

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7891

Fixes: 5b205ef (r600: Store nir shaders serialized to save memory)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20355>

src/gallium/drivers/r600/r600_shader.c

index 2cc06a5..dd6186b 100644 (file)
@@ -395,7 +395,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
                           shader->shader.bc.ncf,
                           shader->shader.bc.nstack);
 
-       if (!sel->nir_blob && sel->nir) {
+       if (!sel->nir_blob && sel->nir && sel->ir_type != PIPE_SHADER_IR_TGSI) {
                struct blob blob;
                blob_init(&blob);
                nir_serialize(&blob, sel->nir, false);