mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-06 17:15:23 +00:00
Fix x86 crash: CreateTexture command buffer read uses wrong type (#3643)
The _external parameter is written to the command buffer as uint64_t (8 bytes) but read back as uintptr_t (4 bytes on 32-bit). This causes a 4-byte deserialization misalignment on x86, corrupting all subsequent command buffer reads and leading to EXCEPTION_ACCESS_VIOLATION (0xC0000005) during D3D11 initialization. Co-authored-by: Matteo Valdina <mavaldin@microsoft.com>
This commit is contained in:
@@ -3344,7 +3344,7 @@ namespace bgfx
|
||||
uint8_t skip;
|
||||
_cmdbuf.read(skip);
|
||||
|
||||
uintptr_t external;
|
||||
uint64_t external;
|
||||
_cmdbuf.read(external);
|
||||
|
||||
void* ptr = m_renderCtx->createTexture(handle, mem, flags, skip, external);
|
||||
|
||||
Reference in New Issue
Block a user