diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-09 03:22:50 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 3f31a547e04b9899f1e572faa7a830aca107033e (patch) | |
tree | c72f09d84042d840d71dbc1d48e870cef43c92b6 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: Implement fswzadd (diff) | |
download | yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar.gz yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar.bz2 yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar.lz yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar.xz yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.tar.zst yuzu-3f31a547e04b9899f1e572faa7a830aca107033e.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index 6c2828644..e0d678554 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -239,6 +239,7 @@ bool UsesTyplessImage(const Info& info) { EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, const RuntimeInfo& runtime_info_) : info{program.info}, profile{profile_}, runtime_info{runtime_info_} { + header += "#pragma optionNV(fastmath off)\n"; SetupExtensions(header); stage = program.stage; switch (program.stage) { @@ -351,6 +352,9 @@ void EmitContext::SetupExtensions(std::string&) { if (info.uses_sparse_residency) { header += "#extension GL_ARB_sparse_texture2 : enable\n"; } + if (info.stores_viewport_mask && profile.support_viewport_mask) { + header += "#extension GL_NV_viewport_array2 : enable\n"; + } if (UsesTyplessImage(info)) { header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; } |