OSDN Git Service

radeonsi/gfx9: always wrap GS and TCS in an if-block (v2)
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 14 Jul 2017 12:33:37 +0000 (14:33 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 27 Jul 2017 19:16:32 +0000 (21:16 +0200)
commit081ac6e5c6d2ef3931b27eb755d1a38827582a45
tree180012a92263c4062eb9bee9c98e2e6c81d6e583
parent873789002f5d1c7c6c39231a8c8d541f4f61e65c
radeonsi/gfx9: always wrap GS and TCS in an if-block (v2)

With merged ESGS shaders, the GS part of a wave may be empty, and the
hardware gets confused if any GS messages are sent from that wave. Since
S_SENDMSG is executed even when EXEC = 0, we have to wrap even
non-monolithic GS shaders in an if-block, so that the entire shader and
hence the S_SENDMSG instructions are skipped in empty waves.

This change is not required for TCS/HS, but applying it there as well
simplifies the logic a bit.

Fixes GL45-CTS.geometry_shader.rendering.rendering.*

v2: ensure that the TCS epilog doesn't run for non-existing patches

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_internal.h