diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-08 07:55:12 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 8bb8bbf4ae2ef259857efe49436dfd71758ea092 (patch) | |
tree | 73c66ae1b91a91ca569ebe0473df12e870fb254a /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: Implement indexed attribute loads (diff) | |
download | yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar.gz yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar.bz2 yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar.lz yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar.xz yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.tar.zst yuzu-8bb8bbf4ae2ef259857efe49436dfd71758ea092.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index ed0955da0..6c2828644 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -306,6 +306,7 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile SetupImages(bindings); SetupTextures(bindings); DefineHelperFunctions(); + DefineConstants(); } void EmitContext::SetupExtensions(std::string&) { @@ -339,6 +340,9 @@ void EmitContext::SetupExtensions(std::string&) { if (!info.uses_int64) { header += "#extension GL_ARB_gpu_shader_int64 : enable\n"; } + if (profile.support_gl_warp_intrinsics) { + header += "#extension GL_NV_shader_thread_shuffle : enable\n"; + } } if (info.stores_viewport_index && profile.support_viewport_index_layer_non_geometry && stage != Stage::Geometry) { @@ -605,4 +609,11 @@ void EmitContext::SetupTextures(Bindings& bindings) { } } +void EmitContext::DefineConstants() { + if (info.uses_fswzadd) { + header += "const float FSWZ_A[]=float[4](-1.f,1.f,-1.f,0.f);" + "const float FSWZ_B[]=float[4](-1.f,-1.f,1.f,-1.f);"; + } +} + } // namespace Shader::Backend::GLSL |