Merge aosp/upstream-vulkan-cts-1.0-dev into aosp/master
authorPyry Haulos <phaulos@google.com>
Thu, 25 Aug 2016 16:57:56 +0000 (09:57 -0700)
committerPyry Haulos <phaulos@google.com>
Thu, 25 Aug 2016 17:15:10 +0000 (10:15 -0700)
Change-Id: I8c82777d467d18369f7e461fd2da1dc2045fc52b

1  2 
Android.mk
modules/gles31/functional/es31fNegativeShaderImageLoadStoreTests.cpp

diff --cc Android.mk
Simple merge
@@@ -390,7 -400,7 +390,7 @@@ void testShader (NegativeTestContext& c
        ctx.endSection();
  }
  
- void image_store (NegativeTestContext& ctx, gls::TextureTestUtil::TextureType imageType)
 -void image_store (NegativeTestContext& ctx)
++void image_store (NegativeTestContext& ctx, glu::TextureTestUtil::TextureType imageType)
  {
        const tcu::TextureFormat formats[] =
        {
        ctx.endSection();
  }
  
- void image_load (NegativeTestContext& ctx, gls::TextureTestUtil::TextureType imageType)
 -void image_load (NegativeTestContext& ctx)
++void image_load (NegativeTestContext& ctx, glu::TextureTestUtil::TextureType imageType)
  {
        const tcu::TextureFormat formats[] =
        {
        ctx.endSection();
  }
  
- void image_atomic (NegativeTestContext& ctx, gls::TextureTestUtil::TextureType imageType)
 -void image_atomic (NegativeTestContext& ctx)
++void image_atomic (NegativeTestContext& ctx, glu::TextureTestUtil::TextureType imageType)
  {
        const tcu::TextureFormat formats[] =
        {
        ctx.endSection();
  }
  
- void image_atomic_exchange (NegativeTestContext& ctx, gls::TextureTestUtil::TextureType imageType)
 -void image_atomic_exchange (NegativeTestContext& ctx)
++void image_atomic_exchange (NegativeTestContext& ctx, glu::TextureTestUtil::TextureType imageType)
  {
        const tcu::TextureFormat formats[] =
        {
        ctx.endSection();
  }
  
-       image_load(ctx, (gls::TextureTestUtil::TextureType)Type);
 +// Re-routing function template for generating the standard negative
 +// test function signature with texture type added.
 +
 +template <int Type>
 +void loadFuncWrapper (NegativeTestContext& ctx)
 +{
-       image_store(ctx, (gls::TextureTestUtil::TextureType)Type);
++      image_load(ctx, (glu::TextureTestUtil::TextureType)Type);
 +}
 +
 +template <int Type>
 +void storeFuncWrapper (NegativeTestContext& ctx)
 +{
-       image_atomic(ctx, (gls::TextureTestUtil::TextureType)Type);
++      image_store(ctx, (glu::TextureTestUtil::TextureType)Type);
 +}
 +
 +template <int Type>
 +void atomicFuncWrapper (NegativeTestContext& ctx)
 +{
-       image_atomic_exchange(ctx, (gls::TextureTestUtil::TextureType)Type);
++      image_atomic(ctx, (glu::TextureTestUtil::TextureType)Type);
 +}
 +
 +template <int Type>
 +void atomicExchangeFuncWrapper (NegativeTestContext& ctx)
 +{
++      image_atomic_exchange(ctx, (glu::TextureTestUtil::TextureType)Type);
 +}
 +
  } // anonymous
  
 -std::vector<FunctionContainer> getNegativeShaderImageLoadStoreTestFunctions (void)
 +// Set of texture types to create tests for.
 +#define CREATE_TEST_FUNC_PER_TEXTURE_TYPE(NAME, FUNC) const FunctionContainer NAME[] =                                                                        \
 +      {                                                                                                                                                                                                                                       \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_2D>,                    "texture_2d",   "Texture2D negative tests."},                   \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_3D>,                    "texture_3d",   "Texture3D negative tests."},                   \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_CUBE>,                  "cube",                 "Cube texture negative tests."},                \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_2D_ARRAY>,              "2d_array",             "2D array texture negative tests."},    \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_BUFFER>,                "buffer",               "Buffer negative tests."},                              \
-               {FUNC<gls::TextureTestUtil::TEXTURETYPE_CUBE_ARRAY>,    "cube_array",   "Cube array texture negative tests."}   \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_2D>,                    "texture_2d",   "Texture2D negative tests."},                   \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_3D>,                    "texture_3d",   "Texture3D negative tests."},                   \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_CUBE>,                  "cube",                 "Cube texture negative tests."},                \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_2D_ARRAY>,              "2d_array",             "2D array texture negative tests."},    \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_BUFFER>,                "buffer",               "Buffer negative tests."},                              \
++              {FUNC<glu::TextureTestUtil::TEXTURETYPE_CUBE_ARRAY>,    "cube_array",   "Cube array texture negative tests."}   \
 +      }
 +
 +std::vector<FunctionContainer> getNegativeShaderImageLoadTestFunctions (void)
  {
 -      const FunctionContainer funcs[] =
 -      {
 -              {image_store,                           "image_store",                          "Test incorrect usage of imageStore()"                  },
 -              {image_load,                            "image_load",                           "Test incorrect usage of imageLoad()"                   },
 -              {image_atomic,                          "image_atomic",                         "Test incorrect usage of imageAtomic*()"                },
 -              {image_atomic_exchange,         "image_atomic_exchange",        "Test incorrect usage of imageAtomicExchange()" },
 -      };
 +      CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, loadFuncWrapper);
 +      return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
 +}
  
 +std::vector<FunctionContainer> getNegativeShaderImageStoreTestFunctions (void)
 +{
 +      CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, storeFuncWrapper);
 +      return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
 +}
 +
 +std::vector<FunctionContainer> getNegativeShaderImageAtomicTestFunctions (void)
 +{
 +      CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, atomicFuncWrapper);
 +      return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
 +}
 +
 +std::vector<FunctionContainer> getNegativeShaderImageAtomicExchangeTestFunctions (void)
 +{
 +      CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, atomicExchangeFuncWrapper);
        return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
  }