rsx/common/d3d12: Force depth to be at least 1.

This commit is contained in:
Vincent Lejeune 2015-12-19 18:49:03 +01:00
parent a97dc349b7
commit 9c6539ea2d
2 changed files with 2 additions and 0 deletions

View file

@ -266,6 +266,7 @@ std::vector<MipmapLevelInfo> 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);

View file

@ -53,6 +53,7 @@ ComPtr<ID3D12Resource> 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);