]> git.sesse.net Git - movit/commitdiff
Bump compute shader header to #version 150.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Nov 2017 20:13:14 +0000 (21:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Nov 2017 20:13:51 +0000 (21:13 +0100)
NVIDIA requires this for the layout qualifier, and it's probably right.
Note that this required moving the unit tests to a core context,
due to Mesa's demands.

gtest_sdl_main.cpp
header.comp

index be8bdd4d372054f68c81cf28968dcb40a88f8c4e..f4a4d0540bc0cf5efc8c23d0f5491365f7c8c95b 100644 (file)
@@ -21,15 +21,10 @@ int main(int argc, char **argv) {
        SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0);
        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
 
-       // You can uncomment this if you want to try a core context.
-       // For Mesa, you can get the same effect by doing
-       //
-       //   export MESA_GL_VERSION_OVERRIDE=3.1FC
-       //
-       // before running tests.
-//     SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
-//     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
-//     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
+       // Use a core context, because Mesa only allows certain OpenGL versions in core.
+       SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
+       SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
+       SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
 
        // See also init.cpp for how to enable debugging.
 //     SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
index 5487b20fa3a33557cedf0ab76e6e5aa3105b61d4..276656896c51dfdab5245dde05f404f87cb9eaf7 100644 (file)
@@ -1,4 +1,4 @@
-#version 130
+#version 150
 #extension GL_ARB_compute_shader : enable
 #extension GL_ARB_shader_image_load_store : enable