From 8804a4eb23e0c4f3e4bab03dee7c204bd38bf21e Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 23 Nov 2022 21:30:23 +0000 Subject: shader_recompiler: Align SSBO offsets to meet host requirements We can take advantage of SSBO addresses being passed in a constant bufer to account for the extra alignment requirements in the shader itself. --- src/shader_recompiler/host_translate_info.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shader_recompiler/host_translate_info.h') diff --git a/src/shader_recompiler/host_translate_info.h b/src/shader_recompiler/host_translate_info.h index d5d279554..7df090124 100644 --- a/src/shader_recompiler/host_translate_info.h +++ b/src/shader_recompiler/host_translate_info.h @@ -15,6 +15,7 @@ struct HostTranslateInfo { bool needs_demote_reorder{}; ///< True when the device needs DemoteToHelperInvocation reordered bool support_snorm_render_buffer{}; ///< True when the device supports SNORM render buffers bool support_viewport_index_layer{}; ///< True when the device supports gl_Layer in VS + u32 min_ssbo_alignment{}; ///< Minimum alignment supported by the device for SSBOs }; } // namespace Shader -- cgit v1.2.3 From 625a4af73afec1a45f5a8004b0933f5a3d414103 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sat, 31 Dec 2022 23:19:10 +0000 Subject: shader_recompiler: Add support for lowering geometry passthrough Reuses most of the existing code for generating the gl_Layer passthrough. Fixes geometry in Nier: Automata on GPUs without HW passthrough support. --- src/shader_recompiler/host_translate_info.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shader_recompiler/host_translate_info.h') diff --git a/src/shader_recompiler/host_translate_info.h b/src/shader_recompiler/host_translate_info.h index 7df090124..dc402ee47 100644 --- a/src/shader_recompiler/host_translate_info.h +++ b/src/shader_recompiler/host_translate_info.h @@ -16,6 +16,7 @@ struct HostTranslateInfo { bool support_snorm_render_buffer{}; ///< True when the device supports SNORM render buffers bool support_viewport_index_layer{}; ///< True when the device supports gl_Layer in VS u32 min_ssbo_alignment{}; ///< Minimum alignment supported by the device for SSBOs + bool support_geometry_shader_passthrough{}; ///< True when the device supports geometry passthrough shaders }; } // namespace Shader -- cgit v1.2.3 From 58fec43768c837c63453e87df8f337a2d139324a Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 5 Jan 2023 22:10:21 +0000 Subject: Run clang-format --- src/shader_recompiler/host_translate_info.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/shader_recompiler/host_translate_info.h') diff --git a/src/shader_recompiler/host_translate_info.h b/src/shader_recompiler/host_translate_info.h index dc402ee47..55fc48768 100644 --- a/src/shader_recompiler/host_translate_info.h +++ b/src/shader_recompiler/host_translate_info.h @@ -15,8 +15,9 @@ struct HostTranslateInfo { bool needs_demote_reorder{}; ///< True when the device needs DemoteToHelperInvocation reordered bool support_snorm_render_buffer{}; ///< True when the device supports SNORM render buffers bool support_viewport_index_layer{}; ///< True when the device supports gl_Layer in VS - u32 min_ssbo_alignment{}; ///< Minimum alignment supported by the device for SSBOs - bool support_geometry_shader_passthrough{}; ///< True when the device supports geometry passthrough shaders + u32 min_ssbo_alignment{}; ///< Minimum alignment supported by the device for SSBOs + bool support_geometry_shader_passthrough{}; ///< True when the device supports geometry + ///< passthrough shaders }; } // namespace Shader -- cgit v1.2.3