You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bundled DXMT indexed-draw path carries the signed D3D base vertex through two unsigned command fields:
DXMT_DRAW_INDEXED_ARGUMENTS::BaseVertex
wmtcmd_render_draw_indexed::base_vertex
D3D11's BaseVertexLocation and Metal's indexed-draw baseVertex argument are both signed; negative base vertices are valid.
Deterministic reproduction
Use BaseVertexLocation = -1 in DrawIndexed or DrawIndexedInstanced.
The D3D11 entry point receives signed -1, but the current intermediate fields store 0xffffffff. When the winemetal field is passed to Metal's signed baseVertex parameter, it is promoted as positive 4294967295 rather than -1.
Minimal fix
Change only the two intermediate fields from uint32_t to int32_t. Both types are 32 bits, so the command layout is unchanged while signed promotion is restored.
Problem
The bundled DXMT indexed-draw path carries the signed D3D base vertex through two unsigned command fields:
DXMT_DRAW_INDEXED_ARGUMENTS::BaseVertexwmtcmd_render_draw_indexed::base_vertexD3D11's
BaseVertexLocationand Metal's indexed-drawbaseVertexargument are both signed; negative base vertices are valid.Deterministic reproduction
Use
BaseVertexLocation = -1inDrawIndexedorDrawIndexedInstanced.The D3D11 entry point receives signed
-1, but the current intermediate fields store0xffffffff. When the winemetal field is passed to Metal's signedbaseVertexparameter, it is promoted as positive4294967295rather than-1.Minimal fix
Change only the two intermediate fields from
uint32_ttoint32_t. Both types are 32 bits, so the command layout is unchanged while signed promotion is restored.PR: #758
Validation
origin/main(5ac81eda).git diff --checkpasses.kmk VBoxDxMtsucceeds with LLVM 15.0.7 on top of the build prerequisite in DXMT: fix the supported LLVM 15 build #748.VBoxDxMt.dylib.Signed-off-by: Roberto Nibali rnibali@gmail.com