aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/src/dx/DxSolver.cpp
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
committerMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
commitca32c59a58d37c1822e185a2d5f3d0d3e8943593 (patch)
treeb06b9eec03f34344ef8fc31aa147b2714d3962ee /NvCloth/src/dx/DxSolver.cpp
parentForced rename of platform folders in cmake dir. Git didn't pick this up before. (diff)
downloadnvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.tar.xz
nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.zip
NvCloth 1.1.4 Release. (24070740)
Diffstat (limited to 'NvCloth/src/dx/DxSolver.cpp')
-rw-r--r--NvCloth/src/dx/DxSolver.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/NvCloth/src/dx/DxSolver.cpp b/NvCloth/src/dx/DxSolver.cpp
index 66a8d8f..21caa0b 100644
--- a/NvCloth/src/dx/DxSolver.cpp
+++ b/NvCloth/src/dx/DxSolver.cpp
@@ -350,6 +350,9 @@ void cloth::DxSolver::beginFrame()
mFactory.mConvexMasksDeviceCopy = mFactory.mConvexMasks.mBuffer;
mFactory.mCollisionPlanesDeviceCopy = mFactory.mCollisionPlanes.mBuffer;
mFactory.mCollisionTrianglesDeviceCopy = mFactory.mCollisionTriangles.mBuffer;
+ mFactory.mVirtualParticleSetSizesDeviceCopy = mFactory.mVirtualParticleSetSizes.mBuffer;
+ mFactory.mVirtualParticleIndicesDeviceCopy = mFactory.mVirtualParticleIndices.mBuffer;
+ mFactory.mVirtualParticleWeightsDeviceCopy = mFactory.mVirtualParticleWeights.mBuffer;
// mFactory.mParticleAccelerations = mFactory.mParticleAccelerationsHostCopy;
mFactory.mRestPositionsDeviceCopy = mFactory.mRestPositions.mBuffer;
}
@@ -369,7 +372,8 @@ void cloth::DxSolver::executeKernel()
{
context->CSSetShader(mFactory.mSolverKernelComputeShader, NULL, 0);
- ID3D11ShaderResourceView* resourceViews[18] = {
+ // Set shader StructuredBuffer registers t0-t20
+ ID3D11ShaderResourceView* resourceViews[21] = {
mClothData.mBuffer.resourceView(), /*mFrameData.mBuffer.resourceView()*/NULL,
mIterationData.mBuffer.resourceView(), mFactory.mPhaseConfigs.mBuffer.resourceView(),
mFactory.mConstraints.mBuffer.resourceView(), mFactory.mTethers.mBuffer.resourceView(),
@@ -382,10 +386,15 @@ void cloth::DxSolver::executeKernel()
mFactory.mRestPositionsDeviceCopy.resourceView(),
mFactory.mSelfCollisionIndices.mBuffer.resourceView(),
mFactory.mStiffnessValues.mBuffer.resourceView(),
- mFactory.mTriangles.mBuffer.resourceView()
+ mFactory.mTriangles.mBuffer.resourceView(),
+
+ mFactory.mVirtualParticleSetSizesDeviceCopy.resourceView(),
+ mFactory.mVirtualParticleIndicesDeviceCopy.resourceView(),
+ mFactory.mVirtualParticleWeightsDeviceCopy.resourceView()
};
- context->CSSetShaderResources(0, 18, resourceViews);
+ context->CSSetShaderResources(0, 21, resourceViews);
+ // Set shader RWStructuredBuffer registers u0-u4
ID3D11UnorderedAccessView* accessViews[4] = {
mFactory.mParticles.mBuffer.accessViewRaw(),
mFactory.mSelfCollisionParticles.mBuffer.accessView(),
@@ -398,10 +407,10 @@ void cloth::DxSolver::executeKernel()
context->CSSetShader(NULL, NULL, 0);
- ID3D11ShaderResourceView* resourceViewsNULL[17] = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ ID3D11ShaderResourceView* resourceViewsNULL[21] = {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
- context->CSSetShaderResources(0, 17, resourceViewsNULL);
+ context->CSSetShaderResources(0, 21, resourceViewsNULL);
ID3D11UnorderedAccessView* accessViewsNULL[4] = { NULL, NULL, NULL, NULL };
context->CSSetUnorderedAccessViews(0, 4, accessViewsNULL, NULL);
#if 0