зеркало из https://github.com/AvaloniaUI/angle.git
Vulkan: Fix qualifiers for varyings
`out` variables in the vertex shader and `in` variables in the fragment shader were not decorated with `layout(location=?)` as they should according to the Vulkan GLSL spec. This change makes sure these decorations are present regardless of whether the compiler sees these variables as EvqVaryingIn/Out or EvqVertexOut/FragmentIn. Bug: angleproject:3412 Change-Id: I66473e876cb989a60b0c6d6a5850a8b2c763d8e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590694 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
58957f3dc6
Коммит
e25ff9d82c
|
@ -84,8 +84,7 @@ void TOutputVulkanGLSL::writeLayoutQualifier(TIntermTyped *variable)
|
|||
|
||||
void TOutputVulkanGLSL::writeQualifier(TQualifier qualifier, const TSymbol *symbol)
|
||||
{
|
||||
if (qualifier != EvqUniform && qualifier != EvqVaryingIn && qualifier != EvqVaryingOut &&
|
||||
qualifier != EvqAttribute)
|
||||
if (qualifier != EvqUniform && qualifier != EvqAttribute && !sh::IsVarying(qualifier))
|
||||
{
|
||||
TOutputGLSLBase::writeQualifier(qualifier, symbol);
|
||||
return;
|
||||
|
|
|
@ -3522,9 +3522,6 @@ TEST_P(GLSLTest_ES3, ComplexVaryingStructsUsedInFragmentShader)
|
|||
// Test that an inactive varying struct that doesn't get used in the fragment shader works.
|
||||
TEST_P(GLSLTest_ES3, InactiveVaryingStructUnusedInFragmentShader)
|
||||
{
|
||||
// TODO(syoussefi): http://anglebug.com/3412
|
||||
ANGLE_SKIP_TEST_IF(IsVulkan());
|
||||
|
||||
constexpr char kVS[] =
|
||||
"#version 300 es\n"
|
||||
"in vec4 inputAttribute;\n"
|
||||
|
|
Загрузка…
Ссылка в новой задаче