diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index 511dd7f5be0..e3878317bc3 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -606,6 +606,12 @@ struct ir3_shader_options { struct ir3_const_allocations const_allocs; struct ir3_shader_nir_options nir_options; + + /* Whether FRAG_RESULT_DATAi slots may be dynamically remapped by the driver. + * If true, ir3 will assume it cannot statically use the value of such slots + * anywhere (e.g., as the target of alias.rt). + */ + bool fragdata_dynamic_remap; }; /** diff --git a/src/freedreno/vulkan/tu_clear_blit.cc b/src/freedreno/vulkan/tu_clear_blit.cc index 7016049ea34..48811d9a82e 100644 --- a/src/freedreno/vulkan/tu_clear_blit.cc +++ b/src/freedreno/vulkan/tu_clear_blit.cc @@ -807,6 +807,8 @@ compile_shader(struct tu_device *dev, struct nir_shader *nir, .api_wavesize = IR3_SINGLE_OR_DOUBLE, .real_wavesize = IR3_SINGLE_OR_DOUBLE, .const_allocs = const_allocs, + .fragdata_dynamic_remap = + idx >= GLOBAL_SH_VS_CLEAR && idx <= GLOBAL_SH_FS_CLEAR_MAX, }; ir3_finalize_nir(dev->compiler, &options.nir_options, nir);