mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
D3D12/Texture: Force 16MB uploads down temp texture path
This commit is contained in:
parent
9dab3f9b9b
commit
c7ce9562fa
|
@ -295,7 +295,7 @@ bool Texture::LoadData(u32 x, u32 y, u32 width, u32 height, const void* data, u3
|
||||||
const u32 texel_size = GetTexelSize(m_format);
|
const u32 texel_size = GetTexelSize(m_format);
|
||||||
const u32 upload_pitch = Common::AlignUpPow2(width * texel_size, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
|
const u32 upload_pitch = Common::AlignUpPow2(width * texel_size, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
|
||||||
const u32 upload_size = upload_pitch * height;
|
const u32 upload_size = upload_pitch * height;
|
||||||
if (upload_size > g_d3d12_context->GetTextureStreamBuffer().GetSize())
|
if (upload_size >= g_d3d12_context->GetTextureStreamBuffer().GetSize())
|
||||||
{
|
{
|
||||||
StagingTexture st;
|
StagingTexture st;
|
||||||
if (!st.Create(width, height, m_format, true) || !st.WritePixels(0, 0, width, height, data, pitch))
|
if (!st.Create(width, height, m_format, true) || !st.WritePixels(0, 0, width, height, data, pitch))
|
||||||
|
|
Loading…
Reference in a new issue