profile.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. namespace Shader {
  7. struct Profile {
  8. u32 supported_spirv{0x00010000};
  9. bool unified_descriptor_binding{};
  10. bool support_descriptor_aliasing{};
  11. bool support_int8{};
  12. bool support_int16{};
  13. bool support_vertex_instance_id{};
  14. bool support_float_controls{};
  15. bool support_separate_denorm_behavior{};
  16. bool support_separate_rounding_mode{};
  17. bool support_fp16_denorm_preserve{};
  18. bool support_fp32_denorm_preserve{};
  19. bool support_fp16_denorm_flush{};
  20. bool support_fp32_denorm_flush{};
  21. bool support_fp16_signed_zero_nan_preserve{};
  22. bool support_fp32_signed_zero_nan_preserve{};
  23. bool support_fp64_signed_zero_nan_preserve{};
  24. bool support_explicit_workgroup_layout{};
  25. bool support_vote{};
  26. bool support_viewport_index_layer_non_geometry{};
  27. bool support_viewport_mask{};
  28. bool support_typeless_image_loads{};
  29. bool support_demote_to_helper_invocation{};
  30. bool support_int64_atomics{};
  31. bool support_derivative_control{};
  32. bool support_gl_nv_gpu_shader_5{};
  33. bool support_gl_amd_gpu_shader_half_float{};
  34. bool support_gl_texture_shadow_lod{};
  35. bool support_gl_warp_intrinsics{};
  36. bool support_gl_variable_aoffi{};
  37. bool support_gl_sparse_textures{};
  38. bool support_gl_derivative_control{};
  39. bool warp_size_potentially_larger_than_guest{};
  40. bool lower_left_origin_mode{};
  41. /// Fragment outputs have to be declared even if they are not written to avoid undefined values.
  42. /// See Ori and the Blind Forest's main menu for reference.
  43. bool need_declared_frag_colors{};
  44. /// Prevents fast math optimizations that may cause inaccuracies
  45. bool need_fastmath_off{};
  46. /// OpFClamp is broken and OpFMax + OpFMin should be used instead
  47. bool has_broken_spirv_clamp{};
  48. /// Offset image operands with an unsigned type do not work
  49. bool has_broken_unsigned_image_offsets{};
  50. /// Signed instructions with unsigned data types are misinterpreted
  51. bool has_broken_signed_operations{};
  52. /// Dynamic vec4 indexing is broken on some OpenGL drivers
  53. bool has_gl_component_indexing_bug{};
  54. /// The precise type qualifier is broken in the fragment stage of some drivers
  55. bool has_gl_precise_bug{};
  56. /// Ignores SPIR-V ordered vs unordered using GLSL semantics
  57. bool ignore_nan_fp_comparisons{};
  58. };
  59. } // namespace Shader