resolve merge conflicts of a9ffcc1 to master
authorPyry Haulos <phaulos@google.com>
Mon, 13 Jun 2016 22:21:10 +0000 (15:21 -0700)
committerPyry Haulos <phaulos@google.com>
Mon, 13 Jun 2016 22:21:10 +0000 (15:21 -0700)
Change-Id: I35f661fbec0f2118af483f4a73004f2f8b94528e

1  2 
android/cts/master/com.drawelements.deqp.vk.xml
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/ubo/vktUniformBlockCase.cpp
external/vulkancts/modules/vulkan/ubo/vktUniformBlockCase.hpp
external/vulkancts/modules/vulkan/ubo/vktUniformBlockTests.cpp

                                        <Test name="std140_instance_array_mixed">
                                                <TestInstance/>
                                        </Test>
 +                                      <Test name="std140_instance_array_vertex_comp_access">
 +                                              <TestInstance/>
 +                                      </Test>
 +                                      <Test name="std140_instance_array_fragment_comp_access">
 +                                              <TestInstance/>
 +                                      </Test>
 +                                      <Test name="std140_instance_array_both_comp_access">
 +                                              <TestInstance/>
 +                                      </Test>
 +                                      <Test name="std140_instance_array_mixed_comp_access">
 +                                              <TestInstance/>
 +                                      </Test>
                                </TestCase>
                        </TestSuite>
+                       <TestCase name="link_by_binding">
+                               <Test name="single_buf_single_instance">
+                                       <TestInstance/>
+                               </Test>
+                               <Test name="single_buf_instance_array">
+                                       <TestInstance/>
+                               </Test>
+                               <Test name="per_block_buf_single_instance">
+                                       <TestInstance/>
+                               </Test>
+                               <Test name="per_block_buf_instance_array">
+                                       <TestInstance/>
+                               </Test>
+                       </TestCase>
                        <TestSuite name="random">
                                <TestCase name="scalar_types">
                                        <Test name="0">
@@@ -80945,10 -78248,10 +80945,14 @@@ dEQP-VK.ubo.multi_nested_struct.single_
  dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_fragment
  dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_both
  dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_mixed
 +dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_vertex_comp_access
 +dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_fragment_comp_access
 +dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_both_comp_access
 +dEQP-VK.ubo.multi_nested_struct.single_buffer.std140_instance_array_mixed_comp_access
+ dEQP-VK.ubo.link_by_binding.single_buf_single_instance
+ dEQP-VK.ubo.link_by_binding.single_buf_instance_array
+ dEQP-VK.ubo.link_by_binding.per_block_buf_single_instance
+ dEQP-VK.ubo.link_by_binding.per_block_buf_instance_array
  dEQP-VK.ubo.random.scalar_types.0
  dEQP-VK.ubo.random.scalar_types.1
  dEQP-VK.ubo.random.scalar_types.2
@@@ -1131,9 -949,9 +1134,10 @@@ void generateCompareSrc (std::ostringst
                                                 const std::string&             srcName,
                                                 const std::string&             apiName,
                                                 const UniformLayout&   layout,
+                                                int                                    blockNdx,
                                                 const void*                    basePtr,
 -                                               deUint32                               unusedMask)
 +                                               deUint32                               unusedMask,
 +                                               MatrixLoadFlags                matrixLoadFlag)
  {
        if (type.isBasicType() || (type.isArrayType() && type.getElementType().isBasicType()))
        {
                        std::string op = std::string("[") + de::toString(elementNdx) + "]";
                        std::string elementSrcName = std::string(srcName) + op;
                        std::string elementApiName = std::string(apiName) + op;
-                       generateCompareSrc(src, resultVar, elementType, elementSrcName, elementApiName, layout, basePtr, unusedMask, LOAD_FULL_MATRIX);
 -                      generateCompareSrc(src, resultVar, elementType, elementSrcName, elementApiName, layout, blockNdx, basePtr, unusedMask);
++                      generateCompareSrc(src, resultVar, elementType, elementSrcName, elementApiName, layout, blockNdx, basePtr, unusedMask, LOAD_FULL_MATRIX);
                }
        }
        else
                        std::string op = std::string(".") + memberIter->getName();
                        std::string memberSrcName = std::string(srcName) + op;
                        std::string memberApiName = std::string(apiName) + op;
-                       generateCompareSrc(src, resultVar, memberIter->getType(), memberSrcName, memberApiName, layout, basePtr, unusedMask, LOAD_FULL_MATRIX);
 -                      generateCompareSrc(src, resultVar, memberIter->getType(), memberSrcName, memberApiName, layout, blockNdx, basePtr, unusedMask);
++                      generateCompareSrc(src, resultVar, memberIter->getType(), memberSrcName, memberApiName, layout, blockNdx, basePtr, unusedMask, LOAD_FULL_MATRIX);
                }
        }
  }
@@@ -1230,7 -1043,7 +1234,7 @@@ void generateCompareSrc (std::ostringst
  
                                std::string srcName = srcPrefix + uniform.getName();
                                std::string apiName = apiPrefix + uniform.getName();
-                               generateCompareSrc(src, resultVar, uniform.getType(), srcName, apiName, layout, basePtr, unusedMask, matrixLoadFlag);
 -                              generateCompareSrc(src, resultVar, uniform.getType(), srcName, apiName, layout, blockNdx, basePtr, unusedMask);
++                              generateCompareSrc(src, resultVar, uniform.getType(), srcName, apiName, layout, blockNdx, basePtr, unusedMask, matrixLoadFlag);
                        }
                }
        }
@@@ -290,6 -287,37 +290,37 @@@ private
        int                     m_numInstances;
  };
  
 -              : UniformBlockCase      (testCtx, name, description, bufferMode)
+ class LinkByBindingCase : public UniformBlockCase
+ {
+ public:
+       LinkByBindingCase (tcu::TestContext& testCtx, const std::string& name, const std::string& description, BufferMode bufferMode, int numInstances)
++              : UniformBlockCase      (testCtx, name, description, bufferMode, LOAD_FULL_MATRIX)
+       {
+               UniformBlock& blockA = m_interface.allocBlock("TestBlock");
+               blockA.addUniform(Uniform("a", VarType(glu::TYPE_FLOAT, PRECISION_HIGH)));
+               blockA.addUniform(Uniform("b", VarType(glu::TYPE_UINT_VEC3, PRECISION_LOW), UNUSED_BOTH));
+               blockA.addUniform(Uniform("c", VarType(glu::TYPE_FLOAT_MAT2, PRECISION_MEDIUM)));
+               blockA.setFlags(LAYOUT_STD140|DECLARE_VERTEX);
+               UniformBlock& blockB = m_interface.allocBlock("TestBlock");
+               blockB.addUniform(Uniform("a", VarType(glu::TYPE_FLOAT_MAT3, PRECISION_MEDIUM)));
+               blockB.addUniform(Uniform("b", VarType(glu::TYPE_INT_VEC2, PRECISION_LOW)));
+               blockB.addUniform(Uniform("c", VarType(glu::TYPE_FLOAT_VEC4, PRECISION_HIGH), UNUSED_BOTH));
+               blockB.addUniform(Uniform("d", VarType(glu::TYPE_BOOL, 0)));
+               blockB.setFlags(LAYOUT_STD140|DECLARE_FRAGMENT);
+               if (numInstances > 0)
+               {
+                       blockA.setInstanceName("testBlock");
+                       blockA.setArraySize(numInstances);
+                       blockB.setInstanceName("testBlock");
+                       blockB.setArraySize(numInstances);
+               }
+               init();
+       }
+ };
  void createRandomCaseGroup (tcu::TestCaseGroup* parentGroup, tcu::TestContext& testCtx, const char* groupName, const char* description, UniformBlockCase::BufferMode bufferMode, deUint32 features, int numCases, deUint32 baseSeed)
  {
        tcu::TestCaseGroup* group = new tcu::TestCaseGroup(testCtx, groupName, description);