diff options
| author | 2021-06-07 19:20:32 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:37 -0400 | |
| commit | 2a504b4765320882be8b4f2bde5f90262f76fd9f (patch) | |
| tree | 597ab137b61b75e3fc3ff0b20876ce985f3a9cad /src | |
| parent | glsl: Rebase fixes (diff) | |
| download | yuzu-2a504b4765320882be8b4f2bde5f90262f76fd9f.tar.gz yuzu-2a504b4765320882be8b4f2bde5f90262f76fd9f.tar.xz yuzu-2a504b4765320882be8b4f2bde5f90262f76fd9f.zip | |
glsl: Conditionally add GL_ARB_sparse_texture2
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index 8cbb2ec57..d6b3c7aba 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp | |||
| @@ -294,8 +294,6 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile | |||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | void EmitContext::SetupExtensions(std::string&) { | 296 | void EmitContext::SetupExtensions(std::string&) { |
| 297 | // TODO: track this usage | ||
| 298 | header += "#extension GL_ARB_sparse_texture2 : enable\n"; | ||
| 299 | if (profile.support_gl_texture_shadow_lod) { | 297 | if (profile.support_gl_texture_shadow_lod) { |
| 300 | header += "#extension GL_EXT_texture_shadow_lod : enable\n"; | 298 | header += "#extension GL_EXT_texture_shadow_lod : enable\n"; |
| 301 | } | 299 | } |
| @@ -331,6 +329,9 @@ void EmitContext::SetupExtensions(std::string&) { | |||
| 331 | stage != Stage::Geometry) { | 329 | stage != Stage::Geometry) { |
| 332 | header += "#extension GL_ARB_shader_viewport_layer_array : enable\n"; | 330 | header += "#extension GL_ARB_shader_viewport_layer_array : enable\n"; |
| 333 | } | 331 | } |
| 332 | if (info.uses_sparse_residency) { | ||
| 333 | header += "#extension GL_ARB_sparse_texture2 : enable\n"; | ||
| 334 | } | ||
| 334 | if (UsesTyplessImage(info)) { | 335 | if (UsesTyplessImage(info)) { |
| 335 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; | 336 | header += "#extension GL_EXT_shader_image_load_formatted : enable\n"; |
| 336 | } | 337 | } |