[Bf-blender-cvs] [99e211b13ce] temp-gpu-compute-shaders: Added memory barrier.

Jeroen Bakker noreply at git.blender.org
Fri Apr 23 10:26:22 CEST 2021


Commit: 99e211b13ce7a4148095ed87cb9a16470f97ab13
Author: Jeroen Bakker
Date:   Fri Apr 9 11:16:16 2021 +0200
Branches: temp-gpu-compute-shaders
https://developer.blender.org/rB99e211b13ce7a4148095ed87cb9a16470f97ab13

Added memory barrier.

===================================================================

M	source/blender/gpu/tests/gpu_shader_test.cc

===================================================================

diff --git a/source/blender/gpu/tests/gpu_shader_test.cc b/source/blender/gpu/tests/gpu_shader_test.cc
index 9245aad1416..ad15deeaa6d 100644
--- a/source/blender/gpu/tests/gpu_shader_test.cc
+++ b/source/blender/gpu/tests/gpu_shader_test.cc
@@ -56,6 +56,7 @@ void main() {
   GPU_compute_dispatch(shader, SIZE, SIZE, 1);
 
   /* Check if compute has been done. */
+  GPU_memory_barrier(GPU_BARRIER_TEXTURE_FETCH);
   float *data = static_cast<float *>(GPU_texture_read(texture, GPU_DATA_FLOAT, 0));
   EXPECT_NE(data, nullptr);
   for (int index = 0; index < SIZE * SIZE; index++) {



More information about the Bf-blender-cvs mailing list