If we have a compute shader like below: const std::string &csSource = "#version 450\n" "layout(local_size_x=1, local_size_y=1, local_size_z=1) in;\n" "layout(shared, binding = 1) buffer blockName {\n" " uint data[2];\n" "} instanceName;\n" "void main()\n" "{\n" " instanceName.data[0] = 3u;\n" " instanceName.data[1] = 4u;\n" "}\n"; When we check the buffer data in api side, data[0] is 3u as expected, but data[1] is always 0u. The error is found in ANGLE angle_end2end_tests. See https://chromium-review.googlesource.com/c/angle/angle/+/618132/14/src/tests/gl_tests/ShaderStorageBufferTest.cpp#86 Note: The NVDIA driver works well for it. And Intel Win10 OpenGL driver also works well.
The shader is a bit different in referred angle tests (has additional control flow), do you mean tte shader in description fails as well? Is there some standalone test for this? If not, how to run angle tests?
>do you mean tte shader in description fails as well? Yes, it fails in this shader too. I tested it based on native deqp environment and added a simple test for this bug. It has the same failure with angle end2end test. So I report bug here. Let me clean up my deqp case and I will upload the patch soon. If you want to reproduce this bug in ANGLE, please follow the below steps: 1. Follow https://github.com/google/angle/blob/master/doc/DevSetup.md to build angle on linux. When everything is ready, you can build target angle_end2end_tests #ninja -C out/Release angle_end2end_tests 2. Run #out/Release/angle_end2end_tests --gtest_filter=ShaderStorageBuffer* Then, you will see the failure.
Created attachment 134490 [details] [review] Test shader storage buffer write
Hi Tapani, I have uploaded the deqp patch that I used. 1. put the attachment file 0001-Test-shader-storage-buffer.patch to deqp. 2. git am 0001-Test-shader-storage-buffer.patch 3. in deqp/build-glx, run $ninja -j32 4. cd deqp/build-glx/modules/gles31 5. Run './deqp-gles31 -n dEQP-GLES31.functional.atomic_counter.get.1_counter_1_call_1_thread' Then you will see the result like below: Test case 'dEQP-GLES31.functional.atomic_counter.get.1_counter_1_call_1_thread'.. --------------end: data[0] = 3, data[1] = 0 ============================================= Compute shader compile time = 0.247000 ms Link time = 0.398000 ms Test case duration in microseconds = 7932 us Pass (Pass) DONE! Test run totals: Passed: 1/1 (100.0%) Failed: 0/1 (0.0%) Not supported: 0/1 (0.0%) Warnings: 0/1 (0.0%) However, we expect data[1] = 4 not 0
Hi Tapani, is there any update on this? Can you reproduce this issue now?
Hi, is anyone looking at this bug? There is no update for a long time.
Find that it's test case issue. We should use ARRAY_STRIDE to query the stride between array elements in a buffer variable since the size may be different between 'uint' and 'unsigned int'.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.