Skip to content

fix runtime D3D12 issues found during app testing - #1

Open
igagis-bot wants to merge 9 commits into
mainfrom
fix-runtime-d3d12
Open

igagis-bot wants to merge 9 commits into
mainfrom
fix-runtime-d3d12

Conversation

@igagis-bot

Copy link
Copy Markdown

Runtime fixes discovered while running the ruisapp-directx-test app:

  • D3D12_MEMORY_POOL_UNKNOWN for non-custom heaps (debug layer rejects L0)
  • D3D_ROOT_SIGNATURE_VERSION_1_0 (SDK 10.0.26100.0 serializer rejects 1_1)
  • shader compiler error blob in root signature errors
  • skip Reset() on freshly created command allocator/command list
  • empty vertex/index buffer guards
  • hex-formatted HRESULT in error messages
  • local D3D12_MAX_LOD constant

- use D3D12_MEMORY_POOL_UNKNOWN for non-custom heaps (the D3D12 debug
  layer reports D3D12_MEMORY_POOL_L0 as invalid for them)
- use D3D_ROOT_SIGNATURE_VERSION_1_0: the SDK 10.0.26100.0 serializer
  rejects version 1_1
- include the shader compiler error blob in the root signature
  serialization error message
- skip the Reset() call on a freshly created command allocator and
  command list: some runtimes reject Reset() on them until the first
  work has completed
- do not create GPU resources for empty vertex/index buffers and skip
  the index buffer draw path for them
- format the HRESULT in check_hresult() as a hex number
- use a local D3D12_MAX_LOD constant (removed from the new SDK)
the new windows sdk (10.0.26100+) renamed D3D12_PRIMITIVE_TOPOLOGY_* to
D3D_PRIMITIVE_TOPOLOGY_*; the mingw-w64 headers still use the old names
#define-based detection does not work for the enum values; use the
compiler's mingw define instead. also include directx.hpp in
shader_common.hpp so the shim is visible where to_topology() is defined
the D3D_PRIMITIVE_TOPOLOGY_TRIANGLEFAN enumerator is missing from the
mingw-w64 headers; use a plain constant (6) instead
gcc treats the temporary descriptor handle as a dangling pointer; store it
in a named local instead
vcpkg's win32 build treats the conversion warnings as errors; use
explicit size_t casts for the pointer arithmetic and struct fields
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.

2 participants