diff options
author | Brian Ho <[email protected]> | 2020-05-04 13:55:06 -0700 |
---|---|---|
committer | Brian Ho <[email protected]> | 2020-05-12 13:42:55 -0700 |
commit | a43e9740646a42e3c2d914ad7e0eb20f4113d153 (patch) | |
tree | 20865f8ae8997f69bf8588bcc4ba59372cd03aeb /src/freedreno | |
parent | 1bd38746d5a2d21a2f77e2bf1c6fec17ca5eb6ac (diff) |
turnip: Execute ir3_nir_lower_gs pass again
This commit fixes a GS regression introduced in !4562 where
ir3's GS lowering pass was moved from common code (ir3_nir) to
freedreno-specific code (ir3_shader). For GS support in turnip, we
need to add the GS lowering pass back in, this time in tu_shader.
As for the nir_gather_info change, the GS lowering pass has always
introduced a discard_if intrinsic into the GS. Previously, we simply
ran nir_shader_gather_info before GS lowering, but now since we lower
the GS before we need to remove the assertion that only a FS can use
the discard_if intrinsic.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4892>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 4fda6538fdf..f6cf0b75761 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -567,6 +567,9 @@ tu_shader_create(struct tu_device *dev, if (stage == MESA_SHADER_FRAGMENT) NIR_PASS_V(nir, nir_lower_input_attachments, true); + if (stage == MESA_SHADER_GEOMETRY) + NIR_PASS_V(nir, ir3_nir_lower_gs); + NIR_PASS_V(nir, tu_lower_io, shader, layout); NIR_PASS_V(nir, nir_lower_io, nir_var_all, ir3_glsl_type_size, 0); |