mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 16:16:05 +00:00
Merge pull request #3046 from phire/dx11-segfault
Remove segfault from DX11 backend.
This commit is contained in:
commit
ca7b999968
1 changed files with 2 additions and 1 deletions
|
@ -152,9 +152,10 @@ void PSTextureEncoder::Encode(u8* dst, const TextureCache::TCacheEntryBase *text
|
||||||
CHECK(SUCCEEDED(hr), "map staging buffer (0x%x)", hr);
|
CHECK(SUCCEEDED(hr), "map staging buffer (0x%x)", hr);
|
||||||
|
|
||||||
u8* src = (u8*)map.pData;
|
u8* src = (u8*)map.pData;
|
||||||
|
u32 readStride = std::min(texture_entry->CacheLinesPerRow() * 32, map.RowPitch);
|
||||||
for (unsigned int y = 0; y < texture_entry->NumBlocksY(); ++y)
|
for (unsigned int y = 0; y < texture_entry->NumBlocksY(); ++y)
|
||||||
{
|
{
|
||||||
memcpy(dst, src, texture_entry->CacheLinesPerRow() * 32);
|
memcpy(dst, src, readStride);
|
||||||
dst += texture_entry->memory_stride;
|
dst += texture_entry->memory_stride;
|
||||||
src += map.RowPitch;
|
src += map.RowPitch;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue