/* Create a nir library. */
bool create_library;
+ /* Initial value for shader_info::float_controls_execution_mode,
+ * indicates hardware requirements rather than shader author intent
+ */
+ uint16_t float_controls_execution_mode;
+
struct spirv_supported_capabilities caps;
/* Address format for various kinds of pointers. */
}
b->shader->info.float_controls_execution_mode |= execution_mode;
+
+ for (unsigned bit_size = 16; bit_size <= 64; bit_size *= 2) {
+ vtn_fail_if(nir_is_denorm_flush_to_zero(b->shader->info.float_controls_execution_mode, bit_size) &&
+ nir_is_denorm_preserve(b->shader->info.float_controls_execution_mode, bit_size),
+ "Cannot flush to zero and preserve denorms for the same bit size.");
+ vtn_fail_if(nir_is_rounding_mode_rtne(b->shader->info.float_controls_execution_mode, bit_size) &&
+ nir_is_rounding_mode_rtz(b->shader->info.float_controls_execution_mode, bit_size),
+ "Cannot set rounding mode to RTNE and RTZ for the same bit size.");
+ }
break;
}
words+= 5;
b->shader = nir_shader_create(b, stage, nir_options, NULL);
+ b->shader->info.float_controls_execution_mode = options->float_controls_execution_mode;
/* Handle all the preamble instructions */
words = vtn_foreach_instruction(b, words, word_end,