radeonsi: set is_monolithic for VS prologs when the shader is really monolithic
authorMarek Olšák <marek.olsak@amd.com>
Fri, 6 Dec 2019 02:29:32 +0000 (21:29 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Dec 2019 20:06:07 +0000 (20:06 +0000)
This fixes a bug with NGG that is probably harmless.

Basically, !is_monolithic makes the VS prolog emit
llvm.amdgcn.init.exec.from.input, which sets the EXEC mask to only enable
ES threads. In the NGG non-GS case, the GS threads <= ES threads, so it was
never an issue.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>

src/gallium/drivers/radeonsi/si_shader.c

index 03fc1bef2bf56f7f317fb47b85a200f53e4bc7f9..4453976ef9b76be62dd909849a6be0dfb30e9f0d 100644 (file)
@@ -6939,6 +6939,7 @@ int si_compile_tgsi_shader(struct si_screen *sscreen,
                                             shader->info.num_input_sgprs,
                                             &shader->key.part.vs.prolog,
                                             shader, &prolog_key);
+                       prolog_key.vs_prolog.is_monolithic = true;
                        si_build_vs_prolog_function(&ctx, &prolog_key);
                        parts[0] = ctx.main_fn;
                }