mirror of https://gitlab.freedesktop.org/mesa/mesa
spirv: Move the printf enable out of capabilities
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Iván Briano <ivan.briano@intel.com> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905>
This commit is contained in:
parent
eed3b56402
commit
4b3561b14d
|
@ -91,7 +91,6 @@ struct spirv_supported_capabilities {
|
|||
bool per_view_attributes_nv;
|
||||
bool physical_storage_buffer_address;
|
||||
bool post_depth_coverage;
|
||||
bool printf;
|
||||
bool quad_control;
|
||||
bool ray_cull_mask;
|
||||
bool ray_query;
|
||||
|
|
|
@ -85,6 +85,9 @@ struct spirv_to_nir_options {
|
|||
bool amd_trinary_minmax;
|
||||
bool amd_shader_explicit_vertex_parameter;
|
||||
|
||||
/* Whether or not printf is supported */
|
||||
bool printf;
|
||||
|
||||
struct spirv_supported_capabilities caps;
|
||||
|
||||
/* Address format for various kinds of pointers. */
|
||||
|
|
|
@ -788,7 +788,7 @@ static void
|
|||
handle_printf(struct vtn_builder *b, uint32_t opcode,
|
||||
const uint32_t *w_src, unsigned num_srcs, const uint32_t *w_dest)
|
||||
{
|
||||
if (!b->options->caps.printf) {
|
||||
if (!b->options->printf) {
|
||||
vtn_push_nir_ssa(b, w_dest[1], nir_imm_int(&b->nb, -1));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ create_spirv_options(const device &dev, std::string &r_log)
|
|||
spirv_options.caps.int64_atomics = dev.has_int64_atomics();
|
||||
spirv_options.debug.func = &debug_function;
|
||||
spirv_options.debug.private_data = &r_log;
|
||||
spirv_options.caps.printf = true;
|
||||
spirv_options.printf = true;
|
||||
return spirv_options;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,6 +328,8 @@ impl SPIRVBin {
|
|||
float_controls_execution_mode: float_controls::FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP32
|
||||
as u32,
|
||||
|
||||
printf: true,
|
||||
|
||||
caps: spirv_supported_capabilities {
|
||||
address: true,
|
||||
float16: true,
|
||||
|
@ -343,7 +345,6 @@ impl SPIRVBin {
|
|||
kernel_image_read_write: true,
|
||||
linkage: true,
|
||||
literal_sampler: true,
|
||||
printf: true,
|
||||
..Default::default()
|
||||
},
|
||||
|
||||
|
|
|
@ -748,6 +748,7 @@ clc_spirv_to_dxil(struct clc_libclc *lib,
|
|||
.shared_addr_format = nir_address_format_32bit_offset_as_64bit,
|
||||
.temp_addr_format = nir_address_format_32bit_offset_as_64bit,
|
||||
.float_controls_execution_mode = FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP32,
|
||||
.printf = true,
|
||||
.caps = {
|
||||
.address = true,
|
||||
.float64 = true,
|
||||
|
@ -758,7 +759,6 @@ clc_spirv_to_dxil(struct clc_libclc *lib,
|
|||
.kernel_image = true,
|
||||
.kernel_image_read_write = true,
|
||||
.literal_sampler = true,
|
||||
.printf = true,
|
||||
|
||||
// These aren't fully supported, but silence warnings about them from
|
||||
// code that doesn't really use them.
|
||||
|
|
Loading…
Reference in New Issue