shaderc: GLSL autodetect use of profile 130.
This commit is contained in:
parent
9cdc2b7286
commit
86839f6e2e
@ -67,6 +67,17 @@ static const char* s_OES_texture_3D[] =
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char* s_130[] =
|
||||
{
|
||||
"uint",
|
||||
"uint2",
|
||||
"uint3",
|
||||
"uint4",
|
||||
"isampler3D",
|
||||
"usampler3D",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char* s_uniformTypeName[UniformType::Count] =
|
||||
{
|
||||
"int",
|
||||
@ -1666,13 +1677,17 @@ int main(int _argc, const char* _argv[])
|
||||
|
||||
if (0 == essl)
|
||||
{
|
||||
const bool need130 = 120 == glsl
|
||||
&& bx::findIdentifierMatch(input, s_130)
|
||||
;
|
||||
|
||||
if (0 != metal)
|
||||
{
|
||||
bx::stringPrintf(code, "#version 120\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
bx::stringPrintf(code, "#version %s\n", profile);
|
||||
bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile);
|
||||
}
|
||||
|
||||
bx::stringPrintf(code
|
||||
|
Loading…
Reference in New Issue
Block a user