From ceeb1ece046cae7ac3396eacfc5faa14826265a4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 31 Jul 2016 13:25:45 +0700 Subject: [PATCH] Align buffer offsets to 256 bytes --- renderdoc/driver/d3d12/d3d12_debug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_debug.cpp b/renderdoc/driver/d3d12/d3d12_debug.cpp index 08e373f5b..7ce9bc980 100644 --- a/renderdoc/driver/d3d12/d3d12_debug.cpp +++ b/renderdoc/driver/d3d12/d3d12_debug.cpp @@ -1280,6 +1280,9 @@ void D3D12DebugManager::RenderTextInternal(ID3D12GraphicsCommandList *list, floa m_Font.CharOffset = charOffset + chars; + // Is 256 byte alignment on buffer offsets is just fixed, or device-specific? + m_Font.CharOffset = AlignUp(m_Font.CharOffset, 256 / sizeof(Vec4f)); + unsigned long *texs = NULL; HRESULT hr = m_Font.CharBuffer->Map(0, NULL, (void **)&texs);