Commit 8b851562 by Shahbaz Youssefi Committed by Commit Bot

Don't output matrix qualifiers in I/O blocks

row_major and column_major only apply to uniform and buffer interface blocks per GLSL ES 3.2 spec. Bug: angleproject:3580 Change-Id: Iad0afeffc7ddb7bff2ebaec0ea0ec4eda26171a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2580191 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 36f74334
...@@ -404,8 +404,7 @@ void TOutputGLSLBase::writeVariableType(const TType &type, ...@@ -404,8 +404,7 @@ void TOutputGLSLBase::writeVariableType(const TType &type,
} }
else if (type.getBasicType() == EbtInterfaceBlock) else if (type.getBasicType() == EbtInterfaceBlock)
{ {
const TInterfaceBlock *interfaceBlock = type.getInterfaceBlock(); declareInterfaceBlock(type);
declareInterfaceBlock(interfaceBlock);
} }
else else
{ {
...@@ -1396,15 +1395,19 @@ const char *getVariableInterpolation(TQualifier qualifier) ...@@ -1396,15 +1395,19 @@ const char *getVariableInterpolation(TQualifier qualifier)
return nullptr; return nullptr;
} }
void TOutputGLSLBase::declareInterfaceBlock(const TInterfaceBlock *interfaceBlock) void TOutputGLSLBase::declareInterfaceBlock(const TType &type)
{ {
TInfoSinkBase &out = objSink(); const TInterfaceBlock *interfaceBlock = type.getInterfaceBlock();
TInfoSinkBase &out = objSink();
out << hashName(interfaceBlock) << "{\n"; out << hashName(interfaceBlock) << "{\n";
const TFieldList &fields = interfaceBlock->fields(); const TFieldList &fields = interfaceBlock->fields();
for (const TField *field : fields) for (const TField *field : fields)
{ {
writeFieldLayoutQualifier(field); if (!IsShaderIoBlock(type.getQualifier()))
{
writeFieldLayoutQualifier(field);
}
out << getMemoryQualifiers(*field->type()); out << getMemoryQualifiers(*field->type());
if (writeVariablePrecision(field->type()->getPrecision())) if (writeVariablePrecision(field->type()->getPrecision()))
out << " "; out << " ";
......
...@@ -97,7 +97,7 @@ class TOutputGLSLBase : public TIntermTraverser ...@@ -97,7 +97,7 @@ class TOutputGLSLBase : public TIntermTraverser
private: private:
void declareInterfaceBlockLayout(const TType &type); void declareInterfaceBlockLayout(const TType &type);
void declareInterfaceBlock(const TInterfaceBlock *interfaceBlock); void declareInterfaceBlock(const TType &type);
void writeBuiltInFunctionTriplet(Visit visit, TOperator op, bool useEmulatedFunction); void writeBuiltInFunctionTriplet(Visit visit, TOperator op, bool useEmulatedFunction);
......
...@@ -184,7 +184,6 @@ ...@@ -184,7 +184,6 @@
3886 VULKAN : dEQP-GLES31.functional.image_load_store.3d.*layer = FAIL 3886 VULKAN : dEQP-GLES31.functional.image_load_store.3d.*layer = FAIL
// Geometry shader support: // Geometry shader support:
3580 VULKAN : dEQP-GLES31.functional.shaders.linkage.es31.geometry.varying.types.float_struct = SKIP
5430 VULKAN : dEQP-GLES31.functional.geometry_shading.query.primitives_generated_* = FAIL 5430 VULKAN : dEQP-GLES31.functional.geometry_shading.query.primitives_generated_* = FAIL
5407 VULKAN : dEQP-GLES31.functional.geometry_shading.layered.* = SKIP 5407 VULKAN : dEQP-GLES31.functional.geometry_shading.layered.* = SKIP
5407 VULKAN : dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer* = SKIP 5407 VULKAN : dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer* = SKIP
...@@ -197,10 +196,6 @@ ...@@ -197,10 +196,6 @@
3580 VULKAN : dEQP-GLES31.functional.shaders.linkage.es31.shader_storage_block.ambiguous_variable_name_3 = FAIL 3580 VULKAN : dEQP-GLES31.functional.shaders.linkage.es31.shader_storage_block.ambiguous_variable_name_3 = FAIL
// Missing matching of struct name in member fields of matching nameless I/O blocks // Missing matching of struct name in member fields of matching nameless I/O blocks
3580 VULKAN : dEQP-GLES31.functional.separate_shader.validation.es31.io_blocks.mismatch_different_member_struct_names = FAIL 3580 VULKAN : dEQP-GLES31.functional.separate_shader.validation.es31.io_blocks.mismatch_different_member_struct_names = FAIL
// Failed by glslang errors (matrix or packing qualifiers can only be used on a uniform or buffer)
3580 VULKAN : dEQP-GLES31.functional.program_interface_query.program_input.type.interface_blocks.in.*.mat3x2 = FAIL
3580 VULKAN : dEQP-GLES31.functional.program_interface_query.program_output.type.interface_blocks.out.*.mat3x2 = FAIL
//// ////
//// AMD Vulkan expectations //// AMD Vulkan expectations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment