mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Merge pull request #15764 from unknownbrackets/gpu-minor
GPU: Small scaling variable cleanup
This commit is contained in:
3 files changed
+5
-6
No files matched your search
@@ -499,11 +499,10 @@ TextureScalerCommon::TextureScalerCommon() {
|
||||
TextureScalerCommon::~TextureScalerCommon() {
|
||||
}
|
||||
|
||||
bool TextureScalerCommon::IsEmptyOrFlat(u32* data, int pixels) {
|
||||
int pixelsPerWord = 1;
|
||||
bool TextureScalerCommon::IsEmptyOrFlat(const u32 *data, int pixels) const {
|
||||
u32 ref = data[0];
|
||||
// TODO: SIMD-ify this (although, for most textures we'll get our very early)
|
||||
for (int i = 0; i < pixels; ++i) {
|
||||
// TODO: SIMD-ify this (although, for most textures we'll get out very early)
|
||||
for (int i = 1; i < pixels; ++i) {
|
||||
if (data[i] != ref)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ protected:
|
||||
|
||||
void DePosterize(u32* source, u32* dest, int width, int height);
|
||||
|
||||
bool IsEmptyOrFlat(u32* data, int pixels);
|
||||
bool IsEmptyOrFlat(const u32 *data, int pixels) const;
|
||||
|
||||
// depending on the factor and texture sizes, these can get pretty large
|
||||
// maximum is (100 MB total for a 512 by 512 texture with scaling factor 5 and hybrid scaling)
|
||||
|
||||
@@ -581,7 +581,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
|
||||
BuildTexturePlan plan;
|
||||
plan.hardwareScaling = g_Config.bTexHardwareScaling && uploadCS_ != VK_NULL_HANDLE;
|
||||
plan.slowScaler = !plan.hardwareScaling || vulkan->DevicePerfClass() == PerfClass::SLOW; // Or the GPU is slow - TODO add check!
|
||||
plan.slowScaler = !plan.hardwareScaling || vulkan->DevicePerfClass() == PerfClass::SLOW;
|
||||
if (!PrepareBuildTexture(plan, entry)) {
|
||||
// We're screwed?
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user