]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/device_backend.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / backends / opengl / device_backend.cpp
index 35c0ca5c244d71573979171a1d2de85b2ccad55d..0fcbe07212ccb93783af6e473a7177783d9b98b2 100644 (file)
@@ -3,6 +3,7 @@
 #include <msp/gl/extensions/arb_explicit_uniform_location.h>
 #include <msp/gl/extensions/arb_gpu_shader5.h>
 #include <msp/gl/extensions/arb_separate_shader_objects.h>
+#include <msp/gl/extensions/arb_shader_image_load_store.h>
 #include <msp/gl/extensions/arb_uniform_buffer_object.h>
 #include <msp/gl/extensions/arb_vertex_shader.h>
 #include <msp/gl/extensions/ext_framebuffer_multisample.h>
@@ -62,6 +63,8 @@ void OpenGLDevice::fill_info()
                glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, reinterpret_cast<int *>(&lim.max_vertex_attributes));
                glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, reinterpret_cast<int *>(&lim.max_texture_bindings));
        }
+       if(ARB_shader_image_load_store)
+               glGetIntegerv(GL_MAX_IMAGE_UNITS, reinterpret_cast<int *>(&lim.max_storage_texture_bindings));
        if(EXT_framebuffer_object)
                glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, reinterpret_cast<int *>(&lim.max_color_attachments));
        if(EXT_framebuffer_multisample)
@@ -87,6 +90,11 @@ void OpenGLDevice::fill_info()
        feat.ext_texture_array = EXT_texture_array;
        feat.uniform_binding_range = lim.max_uniform_bindings;
        feat.texture_binding_range = lim.max_texture_bindings;
+       feat.storage_texture_binding_range = lim.max_storage_texture_bindings;
+
+       state.bound_tex_targets.resize(lim.max_texture_bindings);
+       state.bound_storage_textures.resize(lim.max_storage_texture_bindings);
+       state.bound_uniform_blocks.resize(lim.max_uniform_bindings);
 }
 
 } // namespace GL