diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.cpp b/rpcs3/Emu/RSX/Common/TextureUtils.cpp index 8e0dd368b9..99a68b1d09 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.cpp +++ b/rpcs3/Emu/RSX/Common/TextureUtils.cpp @@ -266,6 +266,7 @@ std::vector upload_placed_texture(const rsx::texture &texture, { size_t w = texture.width(), h = texture.height(); size_t depth = texture.depth(); + if (depth == 0) depth = 1; if (texture.cubemap()) depth *= 6; int format = texture.format() & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN); diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp index 1a51b6449f..0bbe8883b7 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp @@ -53,6 +53,7 @@ ComPtr upload_single_texture( { size_t w = texture.width(), h = texture.height(); size_t depth = texture.depth(); + if (depth == 0) depth = 1; if (texture.cubemap()) depth *= 6; const u8 format = texture.format() & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN);