X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompatibility.cpp;h=3407386248210035c8a6dee75fee815a9987696f;hb=836eeb313874d4f0c406f154ecb0dff366f362c4;hp=2e13a5f678eaa7592809fa292071b89cecf28beb;hpb=b30777959d8e2ab2caf489e32f40390f60a75fcb;p=libs%2Fgl.git diff --git a/source/glsl/compatibility.cpp b/source/glsl/compatibility.cpp index 2e13a5f6..34073862 100644 --- a/source/glsl/compatibility.cpp +++ b/source/glsl/compatibility.cpp @@ -2,6 +2,7 @@ #include #include #include "compatibility.h" +#include "glsl_error.h" using namespace std; @@ -259,8 +260,8 @@ void LegacyConverter::visit(VariableDeclaration &var) } else if(stage->type==Stage::FRAGMENT && var.interface=="out") { - if(location!=0) - check_extension(&Features::ext_gpu_shader4); + if(location!=0 && !check_extension(&Features::ext_gpu_shader4)) + throw unsupported_shader("EXT_gpu_shader4 is required"); stage->locations[var.name] = location; var.layout->qualifiers.erase(i); }