Stop using wavefront/warp synchronization inside OpenCL/DirectCompute, it is not future proof.
Similar to this commit for DX11: http://code.google.com/p/bullet/source/detail?spec=svn2343&r=2330 See also http://forum.beyond3d.com/archive/index.php/t-55751.html
This commit is contained in:
@@ -46,18 +46,8 @@ SolvePositionsFromLinksKernel(
|
|||||||
if( wavefront < (startWaveInBatch + numWaves) )
|
if( wavefront < (startWaveInBatch + numWaves) )
|
||||||
{
|
{
|
||||||
// Load the batch counts for the wavefronts
|
// 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 = g_wavefrontBatchCountsVertexCounts[wavefront];
|
||||||
|
|
||||||
|
|
||||||
int2 batchesAndVerticesWithinWavefront = wavefrontBatchCountsVertexCounts[localWavefront];
|
|
||||||
int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
|
int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
|
||||||
int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
|
int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
|
||||||
|
|
||||||
|
|||||||
@@ -47,18 +47,8 @@ SolvePositionsFromLinksKernel(
|
|||||||
if( wavefront < (startWaveInBatch + numWaves) )
|
if( wavefront < (startWaveInBatch + numWaves) )
|
||||||
{
|
{
|
||||||
// Load the batch counts for the wavefronts
|
// 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 = g_wavefrontBatchCountsVertexCounts[wavefront];
|
||||||
|
|
||||||
|
|
||||||
int2 batchesAndVerticesWithinWavefront = wavefrontBatchCountsVertexCounts[localWavefront];
|
|
||||||
int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
|
int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
|
||||||
int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
|
int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user