diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-30 06:53:26 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:36 +0200 |
commit | e35ffbbeb0f85f676416fcb8f0bb0207671f379d (patch) | |
tree | d33fca2f27f8c680c43dfb34da8abd738b0a5705 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: Implement VOTE (diff) | |
download | yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.gz yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.bz2 yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.lz yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.xz yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.zst yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index 5456d4e5b..c6325e55f 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -122,9 +122,11 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile void EmitContext::SetupExtensions(std::string&) { header += "#extension GL_ARB_separate_shader_objects : enable\n"; - header += "#extension GL_ARB_sparse_texture2 : enable\n"; - header += "#extension GL_EXT_texture_shadow_lod : enable\n"; - // header += "#extension GL_ARB_texture_cube_map_array : enable\n"; + if (stage != Stage::Compute) { + // TODO: track this usage + header += "#extension GL_ARB_sparse_texture2 : enable\n"; + header += "#extension GL_EXT_texture_shadow_lod : enable\n"; + } if (info.uses_int64) { header += "#extension GL_ARB_gpu_shader_int64 : enable\n"; } @@ -149,6 +151,10 @@ void EmitContext::SetupExtensions(std::string&) { info.uses_subgroup_shuffles || info.uses_fswzadd) { header += "#extension GL_ARB_shader_ballot : enable\n"; header += "#extension GL_ARB_shader_group_vote : enable\n"; + header += "#extension GL_KHR_shader_subgroup_basic : enable\n"; + if (!info.uses_int64) { + header += "#extension GL_ARB_gpu_shader_int64 : enable\n"; + } } } |