Fix ShaderLibrary vertex layout for matrices
authorPyry Haulos <phaulos@google.com>
Mon, 7 Dec 2015 23:24:16 +0000 (15:24 -0800)
committerPyry Haulos <phaulos@google.com>
Mon, 7 Dec 2015 23:24:16 +0000 (15:24 -0800)
Change-Id: I2b3ad53c81404bf306a82c165496dcb147a52234

external/vulkancts/modules/vulkan/vktShaderLibrary.cpp

index 594d629..30ec1bc 100644 (file)
@@ -964,10 +964,10 @@ vector<vk::VkVertexInputAttributeDescription> getVertexAttributeDescriptions (co
                const ValueBufferLayout::Entry& layoutEntry     = layout.entries[inputNdx];
                const DataType                                  basicType       = input.type.getBasicType();
                const int                                               numVecs         = isDataTypeMatrix(basicType)
-                                                                                                       ? getDataTypeMatrixNumRows(basicType)
+                                                                                                       ? getDataTypeMatrixNumColumns(basicType)
                                                                                                        : 1;
                const int                                               vecSize         = isDataTypeMatrix(basicType)
-                                                                                                       ? getDataTypeMatrixNumColumns(basicType)
+                                                                                                       ? getDataTypeMatrixNumRows(basicType)
                                                                                                        : getDataTypeScalarSize(basicType);
                const vk::VkFormat                              vecFmt          = getFloatVecFormat(vecSize);