Permalink
Browse files

Vulkan: Fix bug in depal causing Sonic Rivals to be grayscale.

  • Loading branch information...
hrydgard committed Nov 5, 2017
1 parent 066ad46 commit 2b7d1c1ded9dde964d0e0cfdc9261b6025d2003b
Showing with 3 additions and 2 deletions.
  1. +3 −2 GPU/Vulkan/TextureCacheVulkan.cpp
@@ -362,12 +362,13 @@ void TextureCacheVulkan::Unbind() {
void TextureCacheVulkan::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) {
DepalShaderVulkan *depalShader = nullptr;
const GEPaletteFormat clutFormat = gstate.getClutPaletteFormat();
uint32_t clutMode = gstate.clutformat & 0xFFFFFF;
if ((entry->status & TexCacheEntry::STATUS_DEPALETTIZE) && !g_Config.bDisableSlowFramebufEffects) {
depalShader = depalShaderCache_->GetDepalettizeShader(clutFormat, framebuffer->drawnFormat);
depalShader = depalShaderCache_->GetDepalettizeShader(clutMode, framebuffer->drawnFormat);
}
if (depalShader) {
depalShaderCache_->SetPushBuffer(drawEngine_->GetPushBufferForTextureData());
const GEPaletteFormat clutFormat = gstate.getClutPaletteFormat();
VulkanTexture *clutTexture = depalShaderCache_->GetClutTexture(clutFormat, clutHash_, clutBuf_);
Draw::Framebuffer *depalFBO = framebufferManager_->GetTempFBO(

0 comments on commit 2b7d1c1

Please sign in to comment.