Skip to content

Commit

Permalink
Vulkan: Allow saving const tex levels.
Browse files Browse the repository at this point in the history
This might be used for fonts, for example.  They could be replaced, so no
reason not to export.
  • Loading branch information
unknownbrackets committed Apr 18, 2022
1 parent 5d22057 commit 39d6dc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions Core/TextureReplacer.h
Expand Up @@ -208,6 +208,7 @@ class TextureReplacer {
return none_;
}

// Notify that a new texture was decoded. May already be upscaled, saves the data passed.
void NotifyTextureDecoded(const ReplacedTextureDecodeInfo &replacedInfo, const void *data, int pitch, int level, int w, int h);

void Decimate(bool forcePressure);
Expand Down
1 change: 0 additions & 1 deletion GPU/Vulkan/TextureCacheVulkan.cpp
Expand Up @@ -845,7 +845,6 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
data = drawEngine_->GetPushBufferForTextureData()->PushAligned(size, &bufferOffset, &texBuf, pushAlignment);
LoadTextureLevel(*entry, (uint8_t *)data, stride, level, scaleFactor, dstFmt);
entry->vkTex->UploadMip(cmdInit, 0, mipWidth, mipHeight, texBuf, bufferOffset, stride / bpp);
break;
} else {
if (computeUpload) {
int srcBpp = dstFmt == VULKAN_8888_FORMAT ? 4 : 2;
Expand Down

0 comments on commit 39d6dc1

Please sign in to comment.