diff --git a/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl b/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl index 28255300e..9a45570ac 100644 --- a/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl +++ b/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl @@ -46,18 +46,8 @@ SolvePositionsFromLinksKernel( if( wavefront < (startWaveInBatch + numWaves) ) { // Load the batch counts for the wavefronts - // Mask out in case there's a stray "wavefront" at the end that's been forced in through the multiplier - if( laneInWavefront == 0 ) - { - int2 batchesAndVertexCountsWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront]; - wavefrontBatchCountsVertexCounts[localWavefront] = batchesAndVertexCountsWithinWavefront; - } - - mem_fence(CLK_LOCAL_MEM_FENCE); - - - int2 batchesAndVerticesWithinWavefront = wavefrontBatchCountsVertexCounts[localWavefront]; + int2 batchesAndVerticesWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront]; int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x; int verticesUsedByWave = batchesAndVerticesWithinWavefront.y; diff --git a/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl b/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl index aaed72988..331634244 100644 --- a/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl +++ b/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl @@ -47,18 +47,8 @@ SolvePositionsFromLinksKernel( if( wavefront < (startWaveInBatch + numWaves) ) { // Load the batch counts for the wavefronts - // Mask out in case there's a stray "wavefront" at the end that's been forced in through the multiplier - if( laneInWavefront == 0 ) - { - int2 batchesAndVertexCountsWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront]; - wavefrontBatchCountsVertexCounts[localWavefront] = batchesAndVertexCountsWithinWavefront; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - - int2 batchesAndVerticesWithinWavefront = wavefrontBatchCountsVertexCounts[localWavefront]; + int2 batchesAndVerticesWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront]; int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x; int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;