@@ -798,6 +798,7 @@ pub struct Writer {
798798
799799 /// Non semantic debug printf extension `OpExtInstImport`
800800 debug_printf : Option < Word > ,
801+ pub ( crate ) ray_query_initialization_tracking : bool ,
801802}
802803
803804bitflags:: bitflags! {
@@ -833,7 +834,8 @@ bitflags::bitflags! {
833834 /// Instead of silently failing if the arguments to generate a ray query are
834835 /// invalid, uses debug printf extension to print to the command line
835836 ///
836- /// Note: VK_KHR_shader_non_semantic_info must be enabled.
837+ /// Note: VK_KHR_shader_non_semantic_info must be enabled. This will have no
838+ /// effect if `options.ray_query_initialization_tracking` is set to false.
837839 const PRINT_ON_RAY_QUERY_INITIALIZATION_FAIL = 0x20 ;
838840 }
839841}
@@ -905,6 +907,10 @@ pub struct Options<'a> {
905907 /// to think the number of iterations is bounded.
906908 pub force_loop_bounding : bool ,
907909
910+ /// if set, ray queries will get a variable to track their state to prevent
911+ /// misuse.
912+ pub ray_query_initialization_tracking : bool ,
913+
908914 /// Whether to use the `StorageInputOutput16` capability for `f16` shader I/O.
909915 /// When false, `f16` I/O is polyfilled using `f32` types with conversions.
910916 pub use_storage_input_output_16 : bool ,
@@ -929,6 +935,7 @@ impl Default for Options<'_> {
929935 bounds_check_policies : BoundsCheckPolicies :: default ( ) ,
930936 zero_initialize_workgroup_memory : ZeroInitializeWorkgroupMemoryMode :: Polyfill ,
931937 force_loop_bounding : true ,
938+ ray_query_initialization_tracking : true ,
932939 use_storage_input_output_16 : true ,
933940 debug_info : None ,
934941 }
0 commit comments