mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-30 17:02:19 +00:00
Vulkan: Remove unused color conv func.
This commit is contained in:
parent
9b15ce0934
commit
a130e2695e
@ -151,38 +151,6 @@ void TextureCacheVulkan::DownloadFramebufferForClut(u32 clutAddr, u32 bytes) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 EstimateTexMemoryUsage(const TextureCacheVulkan::TexCacheEntry *entry) {
|
|
||||||
const u16 dim = entry->dim;
|
|
||||||
const u8 dimW = ((dim >> 0) & 0xf);
|
|
||||||
const u8 dimH = ((dim >> 8) & 0xf);
|
|
||||||
|
|
||||||
u32 pixelSize = 2;
|
|
||||||
switch (entry->format) {
|
|
||||||
case GE_TFMT_CLUT4:
|
|
||||||
case GE_TFMT_CLUT8:
|
|
||||||
case GE_TFMT_CLUT16:
|
|
||||||
case GE_TFMT_CLUT32:
|
|
||||||
// We assume cluts always point to 8888 for simplicity.
|
|
||||||
pixelSize = 4;
|
|
||||||
break;
|
|
||||||
case GE_TFMT_4444:
|
|
||||||
case GE_TFMT_5551:
|
|
||||||
case GE_TFMT_5650:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GE_TFMT_8888:
|
|
||||||
case GE_TFMT_DXT1:
|
|
||||||
case GE_TFMT_DXT3:
|
|
||||||
case GE_TFMT_DXT5:
|
|
||||||
default:
|
|
||||||
pixelSize = 4;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This in other words multiplies by w and h.
|
|
||||||
return pixelSize << (dimW + dimH);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TextureCacheVulkan::Clear(bool delete_them) {
|
void TextureCacheVulkan::Clear(bool delete_them) {
|
||||||
lastBoundTexture = nullptr;
|
lastBoundTexture = nullptr;
|
||||||
if (delete_them) {
|
if (delete_them) {
|
||||||
@ -619,24 +587,6 @@ void TextureCacheVulkan::SetFramebufferSamplingParams(u16 bufferWidth, u16 buffe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ConvertColors(void *dstBuf, const void *srcBuf, VkFormat dstFmt, int numPixels) {
|
|
||||||
const u32 *src = (const u32 *)srcBuf;
|
|
||||||
u32 *dst = (u32 *)dstBuf;
|
|
||||||
switch (dstFmt) {
|
|
||||||
case VULKAN_4444_FORMAT:
|
|
||||||
case VULKAN_1555_FORMAT:
|
|
||||||
case VULKAN_565_FORMAT:
|
|
||||||
if (dst != src)
|
|
||||||
memcpy(dst, src, numPixels * sizeof(u16));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// No need to convert RGBA8888, right order already
|
|
||||||
if (dst != src)
|
|
||||||
memcpy(dst, src, numPixels * sizeof(u32));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TextureCacheVulkan::StartFrame() {
|
void TextureCacheVulkan::StartFrame() {
|
||||||
lastBoundTexture = nullptr;
|
lastBoundTexture = nullptr;
|
||||||
timesInvalidatedAllThisFrame_ = 0;
|
timesInvalidatedAllThisFrame_ = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user