[v3.6.0] Optimize se::Object::getPrivateData, math::IsEqualF, Vec3::transformMat4 (#12039)

This commit is contained in:
James Chen
2022-07-18 14:10:16 +08:00
committed by GitHub
parent 3030a15efa
commit 3025bcd012
26 changed files with 188 additions and 240 deletions
@@ -270,11 +270,11 @@ Sampler *DeviceValidator::getSampler(const SamplerInfo &info) {
GeneralBarrier *DeviceValidator::getGeneralBarrier(const GeneralBarrierInfo &info) {
if (info.prevAccesses > AccessFlagBit::PRESENT) {
// Write access should appear on its own.
CC_ASSERT(math::IsPowerOfTwo(toNumber(info.prevAccesses)));
CC_ASSERT(math::isPowerOfTwo(toNumber(info.prevAccesses)));
}
if (info.nextAccesses > AccessFlagBit::PRESENT) {
// Write access should appear on its own.
CC_ASSERT(math::IsPowerOfTwo(toNumber(info.nextAccesses)));
CC_ASSERT(math::isPowerOfTwo(toNumber(info.nextAccesses)));
}
/////////// execute ///////////
@@ -285,11 +285,11 @@ GeneralBarrier *DeviceValidator::getGeneralBarrier(const GeneralBarrierInfo &inf
TextureBarrier *DeviceValidator::getTextureBarrier(const TextureBarrierInfo &info) {
if (info.prevAccesses > AccessFlagBit::PRESENT) {
// Write access should appear on its own.
CC_ASSERT(math::IsPowerOfTwo(toNumber(info.prevAccesses)));
CC_ASSERT(math::isPowerOfTwo(toNumber(info.prevAccesses)));
}
if (info.nextAccesses > AccessFlagBit::PRESENT) {
// Write access should appear on its own.
CC_ASSERT(math::IsPowerOfTwo(toNumber(info.nextAccesses)));
CC_ASSERT(math::isPowerOfTwo(toNumber(info.nextAccesses)));
}
/////////// execute ///////////