(D3D11/D3D12) Fix crashes with completely black or white thumbnail

textures in XMB
This commit is contained in:
twinaphex 2018-03-30 02:30:56 +02:00
parent be5e0dfb1f
commit 008900e73d
2 changed files with 6 additions and 0 deletions

View File

@ -137,6 +137,9 @@ void d3d11_update_texture(
D3D11_MAPPED_SUBRESOURCE mapped_texture;
D3D11_BOX frame_box = { 0, 0, 0, width, height, 1 };
if (!texture || !texture->staging)
return;
D3D11MapTexture2D(ctx, texture->staging, 0, D3D11_MAP_WRITE, 0, &mapped_texture);
dxgi_copy(

View File

@ -733,6 +733,9 @@ void d3d12_update_texture(
uint8_t* dst;
D3D12_RANGE read_range = { 0, 0 };
if (!texture || !texture->upload_buffer)
return;
D3D12Map(texture->upload_buffer, 0, &read_range, (void**)&dst);
dxgi_copy(