Mesa (main): ac/nir: remove bogus assertion about the position for culling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 28 11:09:13 UTC 2021


Module: Mesa
Branch: main
Commit: d8e45467076789aac6a83c3982dafcf386d56e72
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8e45467076789aac6a83c3982dafcf386d56e72

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Oct 21 18:00:22 2021 +0200

ac/nir: remove bogus assertion about the position for culling

It's undefined to not export a position but some applications rely
on that. The position is always initialized to 0,0,0,1 everywhere else
if not exported.

Fixes KHR-GL46.shader_image_load_store.multiple-uniforms with Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13470>

---

 src/amd/common/ac_nir_lower_ngg.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/amd/common/ac_nir_lower_ngg.c b/src/amd/common/ac_nir_lower_ngg.c
index 9bf628381cc..40db4d96b13 100644
--- a/src/amd/common/ac_nir_lower_ngg.c
+++ b/src/amd/common/ac_nir_lower_ngg.c
@@ -1016,8 +1016,6 @@ apply_reusable_variables(nir_builder *b, lower_ngg_nogs_state *nogs_state)
 static void
 add_deferred_attribute_culling(nir_builder *b, nir_cf_list *original_extracted_cf, lower_ngg_nogs_state *nogs_state)
 {
-   assert(b->shader->info.outputs_written & (1 << VARYING_SLOT_POS));
-
    bool uses_instance_id = BITSET_TEST(b->shader->info.system_values_read, SYSTEM_VALUE_INSTANCE_ID);
    bool uses_tess_primitive_id = BITSET_TEST(b->shader->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID);
 



More information about the mesa-commit mailing list