Vulkan: Add a setting for hardware scaling.

This commit is contained in:
Unknown W. Brackets committed 2019-09-30 00:35:50 -07:00
1 parent 7fa05a3181
commit 41a6831333
3 files changed
+5 -3

No files matched your search

+1
View File
@@ -751,6 +751,7 @@ static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("TexScalingLevel", &g_Config.iTexScalingLevel, 1, true, true),
ReportedConfigSetting("TexScalingType", &g_Config.iTexScalingType, 0, true, true),
ReportedConfigSetting("TexDeposterize", &g_Config.bTexDeposterize, false, true, true),
ReportedConfigSetting("TexHardwareScaling", &g_Config.bTexHardwareScaling, false, true, true),
ConfigSetting("VSyncInterval", &g_Config.bVSync, false, true, true),
ReportedConfigSetting("BloomHack", &g_Config.iBloomHack, 0, true, true),
+1
View File
@@ -170,6 +170,7 @@ public:
int iTexScalingLevel; // 0 = auto, 1 = off, 2 = 2x, ..., 5 = 5x
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
bool bTexDeposterize;
bool bTexHardwareScaling;
int iFpsLimit1;
int iFpsLimit2;
int iMaxRecent;
+3 -3
View File
@@ -1033,14 +1033,14 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
// Don't scale the PPGe texture.
if (entry->addr > 0x05000000 && entry->addr < PSP_GetKernelMemoryEnd())
scaleFactor = 1;
if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1) {
if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1 && !g_Config.bTexHardwareScaling) {
// Remember for later that we /wanted/ to scale this texture.
entry->status |= TexCacheEntry::STATUS_TO_SCALE;
scaleFactor = 1;
}
if (scaleFactor != 1) {
if (texelsScaledThisFrame_ >= TEXCACHE_MAX_TEXELS_SCALED) {
if (texelsScaledThisFrame_ >= TEXCACHE_MAX_TEXELS_SCALED && !g_Config.bTexHardwareScaling) {
entry->status |= TexCacheEntry::STATUS_TO_SCALE;
scaleFactor = 1;
} else {
@@ -1092,7 +1092,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
// If we want to use the GE debugger, we should add VK_IMAGE_USAGE_TRANSFER_SRC_BIT too...
// Compute experiment
if (actualFmt == VULKAN_8888_FORMAT) {
if (actualFmt == VULKAN_8888_FORMAT && scaleFactor > 1 && g_Config.bTexHardwareScaling) {
// Enable the experiment you want.
// computeCopy = true;
computeUpload = true;