diff options
| author | Mat M <mathew1800@gmail.com> | 2016-12-23 04:33:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-23 04:33:42 -0500 |
| commit | 9160be50dbfa31073eda0148378786f69b219805 (patch) | |
| tree | 579bca3b98e8dd47ec3b18911504a669a2853cf9 /Source/Core/VideoBackends/Vulkan/TextureCache.cpp | |
| parent | f2322bee90c1bd973a6cc4e99d4df78c7d2d0027 (diff) | |
| parent | 58a53951735aba77899ea8f8910a6b68dc52449a (diff) | |
Merge pull request #4224 from lioncash/tcache
TextureCacheBase: Eliminate static state
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/TextureCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp index a860e8601d..984aa95db9 100644 --- a/Source/Core/VideoBackends/Vulkan/TextureCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/TextureCache.cpp @@ -328,7 +328,7 @@ TextureCache::TCacheEntry::~TCacheEntry() g_command_buffer_mgr->DeferFramebufferDestruction(m_framebuffer); } -void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height, +void TextureCache::TCacheEntry::Load(const u8* buffer, unsigned int width, unsigned int height, unsigned int expanded_width, unsigned int level) { // Can't copy data larger than the texture extents. @@ -383,7 +383,7 @@ void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height, u8* image_upload_buffer_pointer = upload_buffer->GetCurrentHostPointer(); // Copy to the buffer using the stride from the subresource layout - const u8* source_ptr = TextureCache::temp; + const u8* source_ptr = buffer; if (upload_pitch != source_pitch) { VkDeviceSize copy_pitch = std::min(source_pitch, upload_pitch); @@ -429,7 +429,7 @@ void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height, } // Copy data to staging texture first, then to the "real" texture. - staging_texture->WriteTexels(0, 0, width, height, TextureCache::temp, source_pitch); + staging_texture->WriteTexels(0, 0, width, height, buffer, source_pitch); staging_texture->CopyToImage(g_command_buffer_mgr->GetCurrentInitCommandBuffer(), m_texture->GetImage(), VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, width, height, level, 0); |
