fix some build warnings
This commit is contained in:
committed by
Mathias Agopian
parent
cd01ad06fd
commit
3b59dff577
@@ -102,6 +102,7 @@ extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Stream_nBuilderStream(JNIEnv*, jclass,
|
||||
jlong nativeStreamBuilder, jlong externalTextureId) {
|
||||
StreamBuilder* builder = (StreamBuilder*) nativeStreamBuilder;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
builder->builder()->stream(externalTextureId);
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -374,7 +374,7 @@ float FLightManager::getSpotLightInnerCone(Instance i) const noexcept {
|
||||
const auto& spotParams = getSpotParams(i);
|
||||
float cosOuter = std::cos(spotParams.outerClamped);
|
||||
float scale = spotParams.scaleOffset.x;
|
||||
float inner = std::acos((1.0f / spotParams.scaleOffset.x) + cosOuter);
|
||||
float inner = std::acos((1.0f / scale) + cosOuter);
|
||||
return inner;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,16 +44,8 @@ static void BM_trig(benchmark::State& state) noexcept {
|
||||
{
|
||||
PerformanceCounters pc(state);
|
||||
for (auto _ : state) {
|
||||
if (std::is_same<A, Vector>::value) {
|
||||
#pragma clang loop vectorize(enable)
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
} else if (std::is_same<A, Scalar>::value) {
|
||||
#pragma clang loop unroll(disable) vectorize(disable)
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
benchmark::ClobberMemory();
|
||||
benchmark::DoNotOptimize(res);
|
||||
@@ -81,16 +73,8 @@ static void BM_func(benchmark::State& state) noexcept {
|
||||
{
|
||||
PerformanceCounters pc(state);
|
||||
for (auto _ : state) {
|
||||
if (std::is_same<A, Vector>::value) {
|
||||
#pragma clang loop vectorize(enable)
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
} else if (std::is_same<A, Scalar>::value) {
|
||||
#pragma clang loop unroll(disable) vectorize(disable)
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
for (size_t i = 0, c = data.size(); i < c; i++) {
|
||||
res[i] = f(data[i]);
|
||||
}
|
||||
benchmark::ClobberMemory();
|
||||
benchmark::DoNotOptimize(res);
|
||||
|
||||
Reference in New Issue
Block a user