Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/vkd3d_shader.h | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 768d6050..a7bb2f9a 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -91,6 +91,17 @@ enum vkd3d_shader_compile_option_formatting_flags VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FLAGS), };
+enum vkd3d_shader_hlsl_compatibility_mode +{ + VKD3D_SHADER_HLSL_COMPATIBILITY_DEFAULT = 0, + VKD3D_SHADER_HLSL_COMPATIBILITY_BACKWARDS_COMPATIBLE = 1, + VKD3D_SHADER_HLSL_COMPATIBILITY_STRICT = 2, + + VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_HLSL_COMPATIBILITY), +}; + +#define VKD3D_SHADER_OPTIMIZE_FLAG_SKIP_OPTIMIZATION 0x80000000 + enum vkd3d_shader_compile_option_name { /** @@ -105,6 +116,48 @@ enum vkd3d_shader_compile_option_name VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV = 0x00000002, /** \a value is a member of enum vkd3d_shader_compile_option_formatting_flags. */ VKD3D_SHADER_COMPILE_OPTION_FORMATTING = 0x00000003, + /** + * If \a value is nonzero, do not validate the compiled shader for + * correctness. The default value is zero. + * + * This option is supported by vkd3d_shader_compile(). However, not all + * compilers support validation. + */ + VKD3D_SHADER_COMPILE_OPTION_SKIP_VALIDATION, + /** + * Optimize the compiled code. \a value is an unsigned integer which + * describes the level of optimization to apply, and may be between 0 and 3 + * inclusive. The flag VKD3D_SHADER_OPTIMIZE_FLAG_SKIP_OPTIMIZATION may + * be combined via bitwise OR in order to suppress optimization entirely. + */ + VKD3D_SHADER_COMPILE_OPTION_OPTIMIZE, + /** + * If \a value is nonzero, treat warnings as errors. The generated messages + * are not changed (i.e. warnings are still flagged with the string + * "warning"), but vkd3d_shader_compile() will fail if any warnings are + * generated. + */ + VKD3D_SHADER_COMPILE_OPTION_WARNINGS_ARE_ERRORS, + + VKD3D_SHADER_COMPILE_OPTION_HLSL_PACK_MATRIX_ROW_MAJOR, + VKD3D_SHADER_COMPILE_OPTION_HLSL_PACK_MATRIX_COLUMN_MAJOR, + VKD3D_SHADER_COMPILE_OPTION_HLSL_PARTIAL_PRECISION, + VKD3D_SHADER_COMPILE_OPTION_HLSL_FORCE_VS_SOFTWARE_NO_OPT, + VKD3D_SHADER_COMPILE_OPTION_HLSL_FORCE_PS_SOFTWARE_NO_OPT, + VKD3D_SHADER_COMPILE_OPTION_HLSL_NO_PRESHADER, + VKD3D_SHADER_COMPILE_OPTION_HLSL_AVOID_FLOW_CONTROL, + VKD3D_SHADER_COMPILE_OPTION_HLSL_PREFER_FLOW_CONTROL, + /** \a value is a member of enum vkd3d_shader_hlsl_compatibility_mode. */ + VKD3D_SHADER_COMPILE_OPTION_HLSL_COMPATIBILTY_MODE, + VKD3D_SHADER_COMPILE_OPTION_HLSL_IEEE_STRICTNESS, + VKD3D_SHADER_COMPILE_OPTION_HLSL_RESOURCES_MAY_ALIAS, + VKD3D_SHADER_COMPILE_OPTION_HLSL_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES, + VKD3D_SHADER_COMPILE_OPTION_HLSL_ALL_RESOURCES_BOUND, + VKD3D_SHADER_COMPILE_OPTION_HLSL_EFFECT_CHILD_EFFECT, + VKD3D_SHADER_COMPILE_OPTION_HLSL_EFFECT_ALLOW_SLOW_OPS, + VKD3D_SHADER_COMPILE_OPTION_HLSL_MERGE_UAV_SLOTS, + VKD3D_SHADER_COMPILE_OPTION_HLSL_PRESERVE_TEMPLATE_SLOTS, + VKD3D_SHADER_COMPILE_OPTION_HLSL_REQUIRE_TEMPLATE_MATCH,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_NAME), };