vulkan: Call gather_xfb_info in vk_spirv_to_nir
In particular, we now call it before running dead variables so we get the XFB info even for things which are never written. This fixes a 102 Vulkan CTS tests on ANV and probably turnip as well. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
This commit is contained in:
parent
bd93d6f693
commit
8e99a7f5e3
|
@ -789,11 +789,6 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
|
|||
gl_shader_stage_is_mesh(nir->info.stage))
|
||||
NIR_PASS(_, nir, brw_nir_lower_cs_intrinsics);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX ||
|
||||
nir->info.stage == MESA_SHADER_TESS_EVAL ||
|
||||
nir->info.stage == MESA_SHADER_GEOMETRY)
|
||||
NIR_PASS_V(nir, nir_shader_gather_xfb_info);
|
||||
|
||||
stage->nir = nir;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "vk_nir.h"
|
||||
|
||||
#include "compiler/nir/nir_xfb_info.h"
|
||||
#include "compiler/spirv/nir_spirv.h"
|
||||
#include "vk_log.h"
|
||||
#include "vk_util.h"
|
||||
|
@ -151,6 +152,11 @@ vk_spirv_to_nir(struct vk_device *device,
|
|||
*/
|
||||
NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX ||
|
||||
nir->info.stage == MESA_SHADER_TESS_EVAL ||
|
||||
nir->info.stage == MESA_SHADER_GEOMETRY)
|
||||
NIR_PASS_V(nir, nir_shader_gather_xfb_info);
|
||||
|
||||
NIR_PASS_V(nir, nir_propagate_invariant, false);
|
||||
|
||||
return nir;
|
||||
|
|
Loading…
Reference in New Issue