Fixing copy.
This commit is contained in:
parent
3c98e65997
commit
094e165415
|
@ -1063,7 +1063,7 @@ D3D11GraphicsDriver::TextureInfo D3D11GraphicsDriver::GetTextureInfo(
|
||||||
info.block_height = 0;
|
info.block_height = 0;
|
||||||
switch (fetch.format) {
|
switch (fetch.format) {
|
||||||
case FMT_8_8_8_8:
|
case FMT_8_8_8_8:
|
||||||
info.format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
info.format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||||
info.bpp = 4;
|
info.bpp = 4;
|
||||||
break;
|
break;
|
||||||
case FMT_4_4_4_4:
|
case FMT_4_4_4_4:
|
||||||
|
@ -1204,8 +1204,12 @@ int D3D11GraphicsDriver::FetchTexture2D(
|
||||||
}
|
}
|
||||||
const uint8_t* src = memory_->Translate(address);
|
const uint8_t* src = memory_->Translate(address);
|
||||||
uint8_t* dest = (uint8_t*)res.pData;
|
uint8_t* dest = (uint8_t*)res.pData;
|
||||||
for (size_t n = 0; n < data_size; n++) {
|
for (size_t y = 0; y < height; y++) {
|
||||||
dest[n] = src[n];
|
for (size_t x = 0; x < width * info.bpp; x++) {
|
||||||
|
dest[x] = src[x];
|
||||||
|
}
|
||||||
|
src += data_pitch * info.bpp;
|
||||||
|
dest += res.RowPitch;
|
||||||
}
|
}
|
||||||
context_->Unmap(*out_texture, 0);
|
context_->Unmap(*out_texture, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue