From: Pyry Haulos Date: Thu, 25 Aug 2016 16:57:56 +0000 (-0700) Subject: Merge aosp/upstream-vulkan-cts-1.0-dev into aosp/master X-Git-Tag: upstream/0.1.0~738 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a18cb02cb85a47cccf5d432d9207aab6581e2f75;p=platform%2Fupstream%2FVK-GL-CTS.git Merge aosp/upstream-vulkan-cts-1.0-dev into aosp/master Change-Id: I8c82777d467d18369f7e461fd2da1dc2045fc52b --- a18cb02cb85a47cccf5d432d9207aab6581e2f75 diff --cc modules/gles31/functional/es31fNegativeShaderImageLoadStoreTests.cpp index eb6e6c8,e0622f2..25f59ef --- a/modules/gles31/functional/es31fNegativeShaderImageLoadStoreTests.cpp +++ b/modules/gles31/functional/es31fNegativeShaderImageLoadStoreTests.cpp @@@ -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[] = { @@@ -428,7 -441,7 +428,7 @@@ 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[] = { @@@ -466,7 -482,7 +466,7 @@@ 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[] = { @@@ -513,7 -532,7 +513,7 @@@ 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[] = { @@@ -552,67 -574,18 +552,67 @@@ ctx.endSection(); } +// Re-routing function template for generating the standard negative +// test function signature with texture type added. + +template +void loadFuncWrapper (NegativeTestContext& ctx) +{ - image_load(ctx, (gls::TextureTestUtil::TextureType)Type); ++ image_load(ctx, (glu::TextureTestUtil::TextureType)Type); +} + +template +void storeFuncWrapper (NegativeTestContext& ctx) +{ - image_store(ctx, (gls::TextureTestUtil::TextureType)Type); ++ image_store(ctx, (glu::TextureTestUtil::TextureType)Type); +} + +template +void atomicFuncWrapper (NegativeTestContext& ctx) +{ - image_atomic(ctx, (gls::TextureTestUtil::TextureType)Type); ++ image_atomic(ctx, (glu::TextureTestUtil::TextureType)Type); +} + +template +void atomicExchangeFuncWrapper (NegativeTestContext& ctx) +{ - image_atomic_exchange(ctx, (gls::TextureTestUtil::TextureType)Type); ++ image_atomic_exchange(ctx, (glu::TextureTestUtil::TextureType)Type); +} + } // anonymous -std::vector getNegativeShaderImageLoadStoreTestFunctions (void) +// Set of texture types to create tests for. +#define CREATE_TEST_FUNC_PER_TEXTURE_TYPE(NAME, FUNC) const FunctionContainer NAME[] = \ + { \ - {FUNC, "texture_2d", "Texture2D negative tests."}, \ - {FUNC, "texture_3d", "Texture3D negative tests."}, \ - {FUNC, "cube", "Cube texture negative tests."}, \ - {FUNC, "2d_array", "2D array texture negative tests."}, \ - {FUNC, "buffer", "Buffer negative tests."}, \ - {FUNC, "cube_array", "Cube array texture negative tests."} \ ++ {FUNC, "texture_2d", "Texture2D negative tests."}, \ ++ {FUNC, "texture_3d", "Texture3D negative tests."}, \ ++ {FUNC, "cube", "Cube texture negative tests."}, \ ++ {FUNC, "2d_array", "2D array texture negative tests."}, \ ++ {FUNC, "buffer", "Buffer negative tests."}, \ ++ {FUNC, "cube_array", "Cube array texture negative tests."} \ + } + +std::vector 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(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); +} +std::vector getNegativeShaderImageStoreTestFunctions (void) +{ + CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, storeFuncWrapper); + return std::vector(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); +} + +std::vector getNegativeShaderImageAtomicTestFunctions (void) +{ + CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, atomicFuncWrapper); + return std::vector(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); +} + +std::vector getNegativeShaderImageAtomicExchangeTestFunctions (void) +{ + CREATE_TEST_FUNC_PER_TEXTURE_TYPE(funcs, atomicExchangeFuncWrapper); return std::vector(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); }