зеркало из https://github.com/stride3d/xkslang.git
SPV: Fix issue #369, don't support gl_NumSamples -> SPIR-V.
This commit is contained in:
Родитель
f37f4d23fc
Коммит
bc5196c003
|
@ -40,7 +40,8 @@ ERROR: 0:92: 'call argument' : sampler constructor must appear at point of use
|
|||
ERROR: 0:93: ',' : sampler constructor must appear at point of use
|
||||
ERROR: 0:94: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp sampler2D' and a right operand of type 'temp sampler2D' (or there is no acceptable conversion)
|
||||
ERROR: 0:94: 'call argument' : sampler constructor must appear at point of use
|
||||
ERROR: 38 compilation errors. No code generated.
|
||||
ERROR: 0:96: 'gl_NumSamples' : undeclared identifier
|
||||
ERROR: 39 compilation errors. No code generated.
|
||||
|
||||
|
||||
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
|
||||
|
|
|
@ -92,4 +92,6 @@ void callUserTexture()
|
|||
userTexture((sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
|
||||
userTexture((sampler2D(t2d,s), sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
|
||||
userTexture(cond ? sampler2D(t2d,s) : sampler2D(t2d,s), vTexCoord); // ERROR, no ?:, not point of use
|
||||
|
||||
gl_NumSamples; // ERROR, not for Vulkan
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
// For the version, it uses the latest git tag followed by the number of commits.
|
||||
// For the date, it uses the current date (when then script is run).
|
||||
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1726"
|
||||
#define GLSLANG_REVISION "Overload400-PrecQual.1727"
|
||||
#define GLSLANG_DATE "02-Jan-2017"
|
||||
|
|
|
@ -3010,14 +3010,18 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"flat in int gl_PrimitiveID;"
|
||||
);
|
||||
|
||||
if (version >= 400)
|
||||
if (version >= 400) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"flat in int gl_SampleID;"
|
||||
" in vec2 gl_SamplePosition;"
|
||||
"flat in int gl_SampleMaskIn[];"
|
||||
" out int gl_SampleMask[];"
|
||||
"uniform int gl_NumSamples;"
|
||||
);
|
||||
if (spvVersion.spv == 0)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"uniform int gl_NumSamples;"
|
||||
);
|
||||
}
|
||||
|
||||
if (version >= 430)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
|
@ -3074,8 +3078,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
" in mediump vec2 gl_SamplePosition;"
|
||||
"flat in highp int gl_SampleMaskIn[];"
|
||||
" out highp int gl_SampleMask[];"
|
||||
"uniform lowp int gl_NumSamples;"
|
||||
);
|
||||
if (spvVersion.spv == 0)
|
||||
stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables
|
||||
"uniform lowp int gl_NumSamples;"
|
||||
);
|
||||
}
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"highp float gl_FragDepthEXT;" // GL_EXT_frag_depth
|
||||
|
|
|
@ -2502,7 +2502,6 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co
|
|||
|
||||
void TParseContext::transparentCheck(const TSourceLoc& loc, const TType& type, const TString& /*identifier*/)
|
||||
{
|
||||
// double standard due to gl_NumSamples
|
||||
if (parsingBuiltins)
|
||||
return;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче