diff options
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) { | |||
| 239 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, | 239 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, |
| 240 | const RuntimeInfo& runtime_info_) | 240 | const RuntimeInfo& runtime_info_) |
| 241 | : info{program.info}, profile{profile_}, runtime_info{runtime_info_} { | 241 | : info{program.info}, profile{profile_}, runtime_info{runtime_info_} { |
| 242 | header += "#pragma optionNV(fastmath off)\n"; | ||
| 242 | SetupExtensions(header); | 243 | SetupExtensions(header); |
| 243 | stage = program.stage; | 244 | stage = program.stage; |
| 244 | switch (program.stage) { | 245 | switch (program.stage) { |
| @@ -351,6 +352,9 @@ void EmitContext::SetupExtensions(std::string&) { | |||
| 351 | if (info.uses_sparse_residency) { | 352 | if (info.uses_sparse_residency) { |
| 352 | header += "#extension GL_ARB_sparse_texture2 : enable\n"; | 353 | header += "#extension GL_ARB_sparse_texture2 : enable\n"; |
| 353 | } | 354 | } |
| 355 | if (info.stores_viewport_mask && profile.support_viewport_mask) { | ||
| 356 | header += "#extension GL_NV_viewport_array2 : enable\n"; | ||
| 357 | } | ||
| 354 | if (UsesTyplessImage(info)) { | 358 | if (UsesTyplessImage(info)) { |
| 355 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; | 359 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; |
| 356 | } | 360 | } |