mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Pass interpolator qualifiers into all stages.
This commit is contained in:
committed by
Branimir Karadžić
parent
772d6842d0
commit
39dc313347
@@ -367,6 +367,7 @@ namespace bgfx
|
||||
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
Options::Options()
|
||||
: shaderType(' ')
|
||||
, disasm(false)
|
||||
@@ -1220,6 +1221,7 @@ namespace bgfx
|
||||
else if (0 == bx::strCmpI(platform, "linux") )
|
||||
{
|
||||
preprocessor.setDefine("BX_PLATFORM_LINUX=1");
|
||||
|
||||
if (profile->lang == ShadingLang::SpirV)
|
||||
{
|
||||
preprocessor.setDefine("BGFX_SHADER_LANGUAGE_SPIRV=1");
|
||||
@@ -1229,17 +1231,17 @@ namespace bgfx
|
||||
preprocessor.setDefine(glslDefine);
|
||||
}
|
||||
}
|
||||
else if (
|
||||
0 == bx::strCmpI(platform, "ios") ||
|
||||
0 == bx::strCmpI(platform, "osx") ||
|
||||
0 == bx::strCmpI(platform, "visionos")
|
||||
)
|
||||
else if (0 == bx::strCmpI(platform, "ios")
|
||||
|| 0 == bx::strCmpI(platform, "osx")
|
||||
|| 0 == bx::strCmpI(platform, "visionos")
|
||||
)
|
||||
{
|
||||
if (0 == bx::strCmpI(platform, "osx"))
|
||||
{
|
||||
preprocessor.setDefine("BX_PLATFORM_OSX=1");
|
||||
}
|
||||
else if (0 == bx::strCmpI(platform, "visionos")) {
|
||||
else if (0 == bx::strCmpI(platform, "visionos"))
|
||||
{
|
||||
preprocessor.setDefine("BX_PLATFORM_VISIONOS=1");
|
||||
}
|
||||
else
|
||||
@@ -1257,7 +1259,7 @@ namespace bgfx
|
||||
, sizeof(temp)
|
||||
, "BGFX_SHADER_LANGUAGE_METAL=%d"
|
||||
, (profile->lang == ShadingLang::Metal) ? profile->id : 0
|
||||
);
|
||||
);
|
||||
preprocessor.setDefine(temp);
|
||||
}
|
||||
else if (0 == bx::strCmpI(platform, "windows") )
|
||||
@@ -1359,13 +1361,8 @@ namespace bgfx
|
||||
|| 0 == bx::strCmp(typen, "noperspective", 13)
|
||||
|| 0 == bx::strCmp(typen, "centroid", 8) )
|
||||
{
|
||||
if ('f' == _options.shaderType
|
||||
|| profile->lang == ShadingLang::GLSL
|
||||
|| profile->lang == ShadingLang::ESSL)
|
||||
{
|
||||
interpolation = typen;
|
||||
usesInterpolationQualifiers = true;
|
||||
}
|
||||
interpolation = typen;
|
||||
usesInterpolationQualifiers = true;
|
||||
|
||||
typen = nextWord(parse);
|
||||
}
|
||||
|
||||
@@ -603,8 +603,8 @@ namespace bgfx { namespace metal
|
||||
};
|
||||
|
||||
opt.SetMessageConsumer(print_msg_to_stderr);
|
||||
|
||||
opt.RegisterLegalizationPasses();
|
||||
opt.RegisterPerformancePasses();
|
||||
|
||||
spvtools::ValidatorOptions validatorOptions;
|
||||
validatorOptions.SetBeforeHlslLegalization(true);
|
||||
|
||||
@@ -732,8 +732,8 @@ namespace bgfx { namespace spirv
|
||||
};
|
||||
|
||||
opt.SetMessageConsumer(print_msg_to_stderr);
|
||||
|
||||
opt.RegisterLegalizationPasses();
|
||||
opt.RegisterPerformancePasses();
|
||||
|
||||
spvtools::ValidatorOptions validatorOptions;
|
||||
validatorOptions.SetBeforeHlslLegalization(true);
|
||||
|
||||
Reference in New Issue
Block a user