anv: enable application shader printfs with debug option
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
This commit is contained in:
committed by
Marge Bot
parent
4c3bf04dd0
commit
6d3be477ab
@@ -167,6 +167,8 @@ anv_shader_get_spirv_options(struct vk_physical_device *device,
|
||||
.phys_ssbo_addr_format = nir_address_format_64bit_global,
|
||||
.push_const_addr_format = nir_address_format_logical,
|
||||
|
||||
.printf = INTEL_DEBUG(DEBUG_SHADER_PRINT),
|
||||
|
||||
/* TODO: Consider changing this to an address format that has the NULL
|
||||
* pointer equals to 0. That might be a better format to play nice
|
||||
* with certain code / code generators.
|
||||
@@ -215,6 +217,14 @@ anv_shader_preprocess_nir(struct vk_physical_device *device,
|
||||
NIR_PASS(_, nir, nir_opt_barrier_modes);
|
||||
NIR_PASS(_, nir, nir_opt_acquire_release_barriers, SCOPE_QUEUE_FAMILY);
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_SHADER_PRINT)) {
|
||||
const nir_lower_printf_options printf_opts = {
|
||||
.ptr_bit_size = 64,
|
||||
.hash_format_strings = true,
|
||||
};
|
||||
NIR_PASS(_, nir, nir_lower_printf, &printf_opts);
|
||||
}
|
||||
|
||||
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user