X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fprogram_backend.cpp;h=3ebb7da1292d8de854a09131a3eb3ece18eb127b;hb=HEAD;hp=e83a94844dc4e79e28986e0d8dcf8e835e9cad7e;hpb=89347a620294a1136ee111edeadec68390654f78;p=libs%2Fgl.git diff --git a/source/backends/opengl/program_backend.cpp b/source/backends/opengl/program_backend.cpp index e83a9484..3ebb7da1 100644 --- a/source/backends/opengl/program_backend.cpp +++ b/source/backends/opengl/program_backend.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -7,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -79,8 +81,11 @@ unsigned OpenGLProgram::add_stage(Stage type) switch(type) { case VERTEX: { static Require _req(ARB_vertex_shader); gl_type = GL_VERTEX_SHADER; } break; + case TESS_CONTROL: { static Require _req(ARB_tessellation_shader); gl_type = GL_TESS_CONTROL_SHADER; } break; + case TESS_EVAL: { static Require _req(ARB_tessellation_shader); gl_type = GL_TESS_EVALUATION_SHADER; } break; case GEOMETRY: { static Require _req(ARB_geometry_shader4); gl_type = GL_GEOMETRY_SHADER; } break; case FRAGMENT: { static Require _req(ARB_fragment_shader); gl_type = GL_FRAGMENT_SHADER; } break; + case COMPUTE: { static Require _req(ARB_compute_shader); gl_type = GL_COMPUTE_SHADER; } break; default: throw invalid_argument("OpenGLProgram::add_stage"); } @@ -121,8 +126,11 @@ void OpenGLProgram::add_glsl_stages(const GlslModule &mod, const map(wg_size[0], wg_size[1], wg_size[2]); + } const map &block_bindings = compiler.get_uniform_block_bindings(); if(!block_bindings.empty()) @@ -220,8 +234,11 @@ void OpenGLProgram::add_spirv_stages(const SpirVModule &mod, const map