diff options
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) { | |||
| 220 | header += "out int gl_ViewportIndex;"; | 220 | header += "out int gl_ViewportIndex;"; |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
| 223 | |||
| 224 | bool UsesTyplessImage(const Info& info) { | ||
| 225 | for (const auto& desc : info.image_buffer_descriptors) { | ||
| 226 | if (desc.format == ImageFormat::Typeless) { | ||
| 227 | return true; | ||
| 228 | } | ||
| 229 | } | ||
| 230 | for (const auto& desc : info.image_descriptors) { | ||
| 231 | if (desc.format == ImageFormat::Typeless) { | ||
| 232 | return true; | ||
| 233 | } | ||
| 234 | } | ||
| 235 | return false; | ||
| 236 | } | ||
| 237 | } // Anonymous namespace | 223 | } // Anonymous namespace |
| 238 | 224 | ||
| 239 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, | 225 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, |
| @@ -358,7 +344,7 @@ void EmitContext::SetupExtensions(std::string&) { | |||
| 358 | if (info.stores_viewport_mask && profile.support_viewport_mask) { | 344 | if (info.stores_viewport_mask && profile.support_viewport_mask) { |
| 359 | header += "#extension GL_NV_viewport_array2 : enable\n"; | 345 | header += "#extension GL_NV_viewport_array2 : enable\n"; |
| 360 | } | 346 | } |
| 361 | if (UsesTyplessImage(info)) { | 347 | if (info.uses_typeless_image_reads || info.uses_typeless_image_writes) { |
| 362 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; | 348 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; |
| 363 | } | 349 | } |
| 364 | } | 350 | } |