profile.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_native_ndc{};
  34. bool support_gl_nv_gpu_shader_5{};
  35. bool support_gl_amd_gpu_shader_half_float{};
  36. bool support_gl_texture_shadow_lod{};
  37. bool support_gl_warp_intrinsics{};
  38. bool support_gl_variable_aoffi{};
  39. bool support_gl_sparse_textures{};
  40. bool support_gl_derivative_control{};
  41. bool warp_size_potentially_larger_than_guest{};
  42. bool lower_left_origin_mode{};
  43. /// Fragment outputs have to be declared even if they are not written to avoid undefined values.
  44. /// See Ori and the Blind Forest's main menu for reference.
  45. bool need_declared_frag_colors{};
  46. /// Prevents fast math optimizations that may cause inaccuracies
  47. bool need_fastmath_off{};
  48. /// OpFClamp is broken and OpFMax + OpFMin should be used instead
  49. bool has_broken_spirv_clamp{};
  50. /// The Position builtin needs to be wrapped in a struct when used as an input
  51. bool has_broken_spirv_position_input{};
  52. /// Offset image operands with an unsigned type do not work
  53. bool has_broken_unsigned_image_offsets{};
  54. /// Signed instructions with unsigned data types are misinterpreted
  55. bool has_broken_signed_operations{};
  56. /// Float controls break when fp16 is enabled
  57. bool has_broken_fp16_float_controls{};
  58. /// Dynamic vec4 indexing is broken on some OpenGL drivers
  59. bool has_gl_component_indexing_bug{};
  60. /// The precise type qualifier is broken in the fragment stage of some drivers
  61. bool has_gl_precise_bug{};
  62. /// Some drivers do not properly support floatBitsToUint when used on cbufs
  63. bool has_gl_cbuf_ftou_bug{};
  64. /// Some drivers poorly optimize boolean variable references
  65. bool has_gl_bool_ref_bug{};
  66. /// Ignores SPIR-V ordered vs unordered using GLSL semantics
  67. bool ignore_nan_fp_comparisons{};
  68. u32 gl_max_compute_smem_size{};
  69. };
  70. } // namespace Shader