Skip to content

Conversation

@falia18
Copy link

@falia18 falia18 commented Feb 8, 2024

Fix for this issue: https://github.com/falia18/bgfx/tree/pr-example/fix-d3d12-layout-issue
To repro launch 01-cubes with --d3d12, it gives this:
image

The fix makes the layout selection consistant (when both layouts are valid) between these lines:

const uint16_t layoutIdx = !isValid(vb.m_layoutHandle) ? stream.m_layoutHandle.idx : vb.m_layoutHandle.idx;

bgfx/src/renderer_d3d12.cpp

Lines 6893 to 6895 in a9f6104

const uint16_t layoutIdx = isValid(draw.m_stream[idx].m_layoutHandle)
? draw.m_stream[idx].m_layoutHandle.idx
: vb.m_layoutHandle.idx;

(It's my first PR sorry if I messed up something)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant