From 5fc5123f63cd9646546e7c1cf13a99c69a807502 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 25 Jul 2023 17:34:55 +0200 Subject: [PATCH] turnip: Use common nir_vk_is_not_xfb_output On a7xx fixes: dEQP-VK.rasterization.provoking_vertex.transform_feedback.* Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/vulkan/tu_pipeline.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/freedreno/vulkan/tu_pipeline.cc b/src/freedreno/vulkan/tu_pipeline.cc index 3d9b272..d58d070 100644 --- a/src/freedreno/vulkan/tu_pipeline.cc +++ b/src/freedreno/vulkan/tu_pipeline.cc @@ -19,6 +19,7 @@ #include "spirv/nir_spirv.h" #include "util/u_debug.h" #include "util/mesa-sha1.h" +#include "vk_nir.h" #include "vk_pipeline.h" #include "vk_render_pass.h" #include "vk_util.h" @@ -2250,12 +2251,6 @@ tu_append_executable(struct tu_pipeline *pipeline, struct ir3_shader_variant *va util_dynarray_append(&pipeline->executables, struct tu_pipeline_executable, exe); } -static bool -can_remove_out_var(nir_variable *var, void *data) -{ - return !var->data.explicit_xfb_buffer && !var->data.explicit_xfb_stride; -} - static void tu_link_shaders(struct tu_pipeline_builder *builder, nir_shader **shaders, unsigned shaders_count) @@ -2279,7 +2274,7 @@ tu_link_shaders(struct tu_pipeline_builder *builder, } const nir_remove_dead_variables_options out_var_opts = { - .can_remove_var = can_remove_out_var, + .can_remove_var = nir_vk_is_not_xfb_output, }; NIR_PASS_V(producer, nir_remove_dead_variables, nir_var_shader_out, &out_var_opts); -- 2.7.4