From 8f204f0ccf1131302adb55c90bb3c108ef82b183 Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Tue, 26 Sep 2017 18:40:13 +0800 Subject: [PATCH] Test shader storage buffer --- .../gles31/functional/es31fAtomicCounterTests.cpp | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/modules/gles31/functional/es31fAtomicCounterTests.cpp b/modules/gles31/functional/es31fAtomicCounterTests.cpp index 878b2ae7..1cf91370 100644 --- a/modules/gles31/functional/es31fAtomicCounterTests.cpp +++ b/modules/gles31/functional/es31fAtomicCounterTests.cpp @@ -54,6 +54,18 @@ namespace Functional namespace { + static const std::string &csSource = + "#version 310 es\n" + "layout(local_size_x=1, local_size_y=1, local_size_z=1) in;\n" + "layout(std140, binding = 1) buffer blockName {\n" + " uint data[2];\n" + "};\n" + "void main()\n" + "{\n" + " data[0] = 3u;\n" + " data[1] = 4u;\n" + "}\n"; + class AtomicCounterTest : public TestCase { public: @@ -112,6 +124,7 @@ public: void init (void); void deinit (void); IterateResult iterate (void); + void testAtomicCounter (void); private: const TestSpec m_spec; @@ -912,8 +925,54 @@ bool AtomicCounterTest::checkAndLogCallValues (TestLog& log, const vector