diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-09 07:55:36 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | a92669523483eba151d07f7e9655fc5f25af7fcd (patch) | |
tree | 72af649fc12efee0768401916387ed3cd18d79a9 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: Enable early fragment tests (diff) | |
download | yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar.gz yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar.bz2 yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar.lz yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar.xz yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.tar.zst yuzu-a92669523483eba151d07f7e9655fc5f25af7fcd.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index a24fa46c5..e69a56d46 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -220,20 +220,6 @@ void SetupOutPerVertex(EmitContext& ctx, std::string& header) { header += "out int gl_ViewportIndex;"; } } - -bool UsesTyplessImage(const Info& info) { - for (const auto& desc : info.image_buffer_descriptors) { - if (desc.format == ImageFormat::Typeless) { - return true; - } - } - for (const auto& desc : info.image_descriptors) { - if (desc.format == ImageFormat::Typeless) { - return true; - } - } - return false; -} } // Anonymous namespace EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, @@ -358,7 +344,7 @@ void EmitContext::SetupExtensions(std::string&) { if (info.stores_viewport_mask && profile.support_viewport_mask) { header += "#extension GL_NV_viewport_array2 : enable\n"; } - if (UsesTyplessImage(info)) { + if (info.uses_typeless_image_reads || info.uses_typeless_image_writes) { header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; } } |