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:
@@ -325,8 +325,8 @@ static const char* solveConstraintRowsCL= \
|
||||
" return;\n"
|
||||
" int rbA = constraints[i].m_rbA;\n"
|
||||
" int rbB = constraints[i].m_rbB;\n"
|
||||
" batchConstraints[i].m_bodyAPtrAndSignBit = bodies[rbA].m_invMass? rbA : -rbA;\n"
|
||||
" batchConstraints[i].m_bodyBPtrAndSignBit = bodies[rbB].m_invMass? rbB : -rbB;\n"
|
||||
" batchConstraints[i].m_bodyAPtrAndSignBit = bodies[rbA].m_invMass != 0.f ? rbA : -rbA;\n"
|
||||
" batchConstraints[i].m_bodyBPtrAndSignBit = bodies[rbB].m_invMass != 0.f ? rbB : -rbB;\n"
|
||||
" batchConstraints[i].m_batchId = -1;\n"
|
||||
" batchConstraints[i].m_originalConstraintIndex = i;\n"
|
||||
"}\n"
|
||||
|
||||
Reference in New Issue
Block a user