radv/gfx10: Move NGG output handling outside of giant if-statement.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 7 Jul 2019 23:19:55 +0000 (01:19 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 7 Jul 2019 23:49:54 +0000 (01:49 +0200)
commit4d118ad44a46cf3f9c2acee20849951692bb562d
treeafb2c0129ae76ca131d371863145956dc6c73e0f
parent703efab7e419e15e2a343d3014da0fdad093f429
radv/gfx10: Move NGG output handling outside of giant if-statement.

In merged shaders we put a big if around each shader, so both stages
can have a different number of threads. However, the NGG output code
still needs to run if the first shader is not executed.

This can happen when there are more gs threads than vs/es threads, or
when there are 0 es/vs threads (why? no clue).

Fixes: ee21bd7440c "radv/gfx10: implement NGG support (VS only)"
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_nir_to_llvm.c