mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc_glsl: skip interp params when parsing glslopt output
Keywords like `flat` qualify type names. Without skipping them, the parser will not find the type used and fail.
This commit is contained in:
committed by
Бранимир Караџић
parent
de4e62692d
commit
9d09b965f5
@@ -125,6 +125,17 @@ namespace bgfx { namespace glsl
|
||||
continue;
|
||||
}
|
||||
|
||||
if (0 == bx::strCmp(qualifier, "flat", 4)
|
||||
|| 0 == bx::strCmp(qualifier, "smooth", 6)
|
||||
|| 0 == bx::strCmp(qualifier, "noperspective", 13)
|
||||
|| 0 == bx::strCmp(qualifier, "centroid", 8)
|
||||
)
|
||||
{
|
||||
// skip interpolation qualifiers
|
||||
parse.set(eol.getPtr() + 1, parse.getTerm() );
|
||||
continue;
|
||||
}
|
||||
|
||||
if (0 == bx::strCmp(parse, "tmpvar", 6) )
|
||||
{
|
||||
// skip temporaries
|
||||
|
||||
Reference in New Issue
Block a user