profile.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "common/common_types.h"
  5. namespace Shader {
  6. struct Profile {
  7. u32 supported_spirv{0x00010000};
  8. bool unified_descriptor_binding{};
  9. bool support_descriptor_aliasing{};
  10. bool support_int8{};
  11. bool support_int16{};
  12. bool support_int64{};
  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_geometry_shader_passthrough{};
  33. bool support_gl_nv_gpu_shader_5{};
  34. bool support_gl_amd_gpu_shader_half_float{};
  35. bool support_gl_texture_shadow_lod{};
  36. bool support_gl_warp_intrinsics{};
  37. bool support_gl_variable_aoffi{};
  38. bool support_gl_sparse_textures{};
  39. bool support_gl_derivative_control{};
  40. bool warp_size_potentially_larger_than_guest{};
  41. bool lower_left_origin_mode{};
  42. /// Fragment outputs have to be declared even if they are not written to avoid undefined values.
  43. /// See Ori and the Blind Forest's main menu for reference.
  44. bool need_declared_frag_colors{};
  45. /// Prevents fast math optimizations that may cause inaccuracies
  46. bool need_fastmath_off{};
  47. /// OpFClamp is broken and OpFMax + OpFMin should be used instead
  48. bool has_broken_spirv_clamp{};
  49. /// Offset image operands with an unsigned type do not work
  50. bool has_broken_unsigned_image_offsets{};
  51. /// Signed instructions with unsigned data types are misinterpreted
  52. bool has_broken_signed_operations{};
  53. /// Float controls break when fp16 is enabled
  54. bool has_broken_fp16_float_controls{};
  55. /// Dynamic vec4 indexing is broken on some OpenGL drivers
  56. bool has_gl_component_indexing_bug{};
  57. /// The precise type qualifier is broken in the fragment stage of some drivers
  58. bool has_gl_precise_bug{};
  59. /// Some drivers do not properly support floatBitsToUint when used on cbufs
  60. bool has_gl_cbuf_ftou_bug{};
  61. /// Some drivers poorly optimize boolean variable references
  62. bool has_gl_bool_ref_bug{};
  63. /// Ignores SPIR-V ordered vs unordered using GLSL semantics
  64. bool ignore_nan_fp_comparisons{};
  65. u32 gl_max_compute_smem_size{};
  66. };
  67. } // namespace Shader