mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 08:41:31 +00:00
[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:
@@ -37,13 +37,6 @@ using namespace Microsoft::WRL;
|
||||
class CFrameBufferResource
|
||||
{
|
||||
private:
|
||||
enum ResourceType
|
||||
{
|
||||
RESOURCE_NONE,
|
||||
RESOURCE_BUFFER,
|
||||
RESOURCE_TEXTURE,
|
||||
};
|
||||
|
||||
unsigned m_frameIndex = 0;
|
||||
uint8_t * m_base = nullptr;
|
||||
size_t m_size = 0;
|
||||
@@ -62,16 +55,13 @@ class CFrameBufferResource
|
||||
unsigned m_copyPitch = 0;
|
||||
unsigned m_copyBytesPerPixel = 0;
|
||||
unsigned m_candidateIndex = 0;
|
||||
ResourceType m_type = RESOURCE_NONE;
|
||||
D3D12_RESOURCE_DESC m_desc = {};
|
||||
std::atomic<bool> m_completionHandled = false;
|
||||
ComPtr<ID3D12Resource> m_res;
|
||||
void * m_map = nullptr;
|
||||
|
||||
public:
|
||||
bool Init(CD3D12Device * dx12, unsigned frameIndex, uint8_t * base,
|
||||
uint64_t heapOffset, size_t size, size_t maxFrameSize,
|
||||
const D3D12_RESOURCE_DESC * textureDesc = nullptr);
|
||||
uint64_t heapOffset, size_t size, size_t maxFrameSize);
|
||||
void Reset();
|
||||
|
||||
unsigned GetFrameIndex() { return m_frameIndex; }
|
||||
|
||||
Reference in New Issue
Block a user