From be16dac2a2d8b4935432c0ed94b7f24b679ceca9 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 15 Feb 2021 21:07:02 +0100 Subject: [PATCH] early-access version 1463 --- README.md | 2 +- src/core/CMakeLists.txt | 1 + src/video_core/textures/astc.h | 18 +++++------------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c52ace77f..619d9cda9 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1462. +This is the source code for early-access 1463. ## Legal Notice diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 4482c445e..c6bdf72ec 100755 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -265,6 +265,7 @@ add_library(core STATIC hle/service/am/applets/software_keyboard.h hle/service/am/applets/web_browser.cpp hle/service/am/applets/web_browser.h + hle/service/am/applets/web_types.h hle/service/am/idle.cpp hle/service/am/idle.h hle/service/am/omm.cpp diff --git a/src/video_core/textures/astc.h b/src/video_core/textures/astc.h index 67d726998..0521b8ca7 100755 --- a/src/video_core/textures/astc.h +++ b/src/video_core/textures/astc.h @@ -4,19 +4,11 @@ #pragma once -#include +#include +#include "common/common_types.h" namespace Tegra::Texture::ASTC { -/// Count the number of bits set in a number. -constexpr u32 Popcnt(u32 n) { - u32 c = 0; - for (; n; c++) { - n &= n - 1; - } - return c; -} - enum class IntegerEncoding { JustBits, Qus32, Trit }; struct IntegerEncodedValue { @@ -57,17 +49,17 @@ constexpr IntegerEncodedValue CreateEncoding(u32 maxVal) { // Is maxVal a power of two? if (!(check & (check - 1))) { - return IntegerEncodedValue(IntegerEncoding::JustBits, Popcnt(maxVal)); + return IntegerEncodedValue(IntegerEncoding::JustBits, std::popcount(maxVal)); } // Is maxVal of the type 3*2^n - 1? if ((check % 3 == 0) && !((check / 3) & ((check / 3) - 1))) { - return IntegerEncodedValue(IntegerEncoding::Trit, Popcnt(check / 3 - 1)); + return IntegerEncodedValue(IntegerEncoding::Trit, std::popcount(check / 3 - 1)); } // Is maxVal of the type 5*2^n - 1? if ((check % 5 == 0) && !((check / 5) & ((check / 5) - 1))) { - return IntegerEncodedValue(IntegerEncoding::Qus32, Popcnt(check / 5 - 1)); + return IntegerEncodedValue(IntegerEncoding::Qus32, std::popcount(check / 5 - 1)); } // Apparently it can't be represented with a bounded integer sequence...