glsl: Add stubs for sparse queries and variable aoffi when not supported

This commit is contained in:
ameerj
2021-06-13 00:05:19 -04:00
parent 6aa1bf7b6f
commit 5e7b2b9661
7 changed files with 47 additions and 13 deletions

View File

@ -384,7 +384,7 @@ void EmitContext::SetupExtensions() {
profile.support_viewport_index_layer_non_geometry && stage != Stage::Geometry) {
header += "#extension GL_ARB_shader_viewport_layer_array : enable\n";
}
if (info.uses_sparse_residency) {
if (info.uses_sparse_residency && profile.support_gl_sparse_textures) {
header += "#extension GL_ARB_sparse_texture2 : enable\n";
}
if (info.stores_viewport_mask && profile.support_viewport_mask) {