mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-02 13:20:10 +00:00
Merge pull request #379 from hsdk/OptimizeComputeDispatches
Optimize GL/DX compute dispatches.
This commit is contained in:
commit
c0a79ae511
@ -213,7 +213,7 @@ private:
|
||||
deviceContext->CSSetConstantBuffers(0, 1, &_uniformArgs); // b0
|
||||
|
||||
deviceContext->CSSetShader(_computeShader, &kernel, 1);
|
||||
deviceContext->Dispatch(count/_workGroupSize + 1, 1, 1);
|
||||
deviceContext->Dispatch((count + _workGroupSize - 1) / _workGroupSize, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ protected:
|
||||
glUniform1i(_uniformOffset, offset);
|
||||
glUniform1i(_uniformNumCVs, numCVs);
|
||||
|
||||
glDispatchCompute(count/_workGroupSize + 1, 1, 1);
|
||||
glDispatchCompute((count + _workGroupSize - 1) / _workGroupSize, 1, 1);
|
||||
|
||||
// sync for later reading.
|
||||
// XXX: in theory, just SHADER_STORAGE_BARRIER is needed here. However
|
||||
|
Loading…
Reference in New Issue
Block a user