Fix ternary selection operator on float scalars in OpenCL kernels.
According to Section 6.3(i) of the OpenCL 1.1 specification, the first expression of the operator cannot be a float.
This commit is contained in:
@@ -954,8 +954,8 @@ float positionConstraintCoeff
|
||||
|
||||
Constraint4 cs;
|
||||
|
||||
float countA = invMassA ? (float)bodyCount[aIdx] : 1;
|
||||
float countB = invMassB ? (float)bodyCount[bIdx] : 1;
|
||||
float countA = invMassA != 0.f ? (float)bodyCount[aIdx] : 1;
|
||||
float countB = invMassB != 0.f ? (float)bodyCount[bIdx] : 1;
|
||||
|
||||
setConstraint4( posA, linVelA, angVelA, invMassA, invInertiaA, posB, linVelB, angVelB, invMassB, invInertiaB,
|
||||
&gContact[gIdx], dt, positionDrift, positionConstraintCoeff,countA,countB,
|
||||
|
||||
Reference in New Issue
Block a user