TextureCache, fix an incorrect assert.

This commit is contained in:
Scott Mansell
2015-12-29 14:25:31 +13:00
parent aabcd441d9
commit d8e5d8659e
4 changed files with 7 additions and 7 deletions

View File

@ -355,7 +355,7 @@ void TextureCache::ConvertTexture(TCacheEntryBase* entry, TCacheEntryBase* uncon
D3D::stateman->SetTexture(1, palette_buf_srv);
// TODO: Add support for C14X2 format. (Different multiplier, more palette entries.)
float params[4] = { (unconverted->format & 0xf) == 0 ? 15.f : 255.f };
float params[4] = { (unconverted->format & 0xf) == GX_TF_I4 ? 15.f : 255.f };
D3D::context->UpdateSubresource(palette_uniform, 0, nullptr, &params, 0, 0);
D3D::stateman->SetPixelConstants(palette_uniform);

View File

@ -570,7 +570,8 @@ void TextureCache::ConvertTexture(TCacheEntryBase* _entry, TCacheEntryBase* _unc
glViewport(0, 0, entry->config.width, entry->config.height);
s_palette_pixel_shader[format].Bind();
int size = unconverted->format == 0 ? 32 : 512;
// C14 textures are currently unsupported
int size = (unconverted->format & 0xf) == GX_TF_I4 ? 32 : 512;
auto buffer = s_palette_stream_buffer->Map(size);
memcpy(buffer.first, palette, size);
s_palette_stream_buffer->Unmap(size);