[idd] capture: preserve software copy row pitch

Use an explicit placed buffer for software frame copies so the D3D copy
uses the same row pitch published through KVMFR.

GetCopyableFootprints describes buffer copies and cannot be used to infer
the physical layout of a placed row-major texture. This caused padded
resolutions to use the wrong row starts in every consumer.

Keep the copy direct to IVSHMEM without a staging or CPU copy.
This commit is contained in:
Geoffrey McRae
2026-08-07 21:10:37 +10:00
parent 1de52f6e8a
commit e470f9d8ae
8 changed files with 34 additions and 173 deletions

View File

@@ -120,9 +120,6 @@ CD3D12Device::InitResult CD3D12Device::Init(
D3D12_HEAP_DESC heapDesc = m_transportHeap->GetDesc();
alignSize = heapDesc.Alignment;
m_directTextureSupported =
(heapDesc.Flags & D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER) &&
!(heapDesc.Flags & D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES);
// test that the heap is usable
if (!HeapTest())
@@ -136,8 +133,6 @@ CD3D12Device::InitResult CD3D12Device::Init(
}
DEBUG_INFO("Using transport memory as a D3D12 heap");
if (!m_directTextureSupported)
DEBUG_WARN("Transport memory does not support placed textures");
}
if (!m_copyQueue.Init(m_device.Get(), D3D12_COMMAND_LIST_TYPE_COPY,

View File

@@ -52,9 +52,8 @@ struct CD3D12Device
CD3D12CommandQueue m_copyQueue;
CD3D12CommandQueue m_computeQueue;
bool m_computeEnabled = false;
bool m_indirectCopy = true;
bool m_directTextureSupported = false;
bool m_computeEnabled = false;
bool m_indirectCopy = true;
bool HeapTest();
@@ -81,7 +80,6 @@ struct CD3D12Device
ComPtr<ID3D12Device3> GetDevice() { return m_device; }
ComPtr<ID3D12Heap > GetTransportHeap() { return m_transportHeap; }
bool IsIndirectCopy() const { return m_indirectCopy; }
bool CanUseDirectTexture() const { return m_directTextureSupported; }
CD3D12CommandSlot * GetCopySlot ();
CD3D12CommandSlot * GetCopySlot (unsigned frameIndex);