-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocating heap memory for low level DX12 backend fails #1379
Comments
Interesting! We don't require that much memory for the heaps, so I wonder why it fails. It'd be great to see the DebugView output from this crash. Debug runtime should have a cleaner error message than just the code. |
Alright, this should be more helpful. |
Interesting, thanks for the info! |
I'll see what I can do. The docs state that there are multiple heap allocation tiers in DX12: Tier 1 supports allocation of heaps with resources of either buffer, regular texture, or Render target/depth stencil texture types, while tier 2 heaps allow resource allocation from any category. Evidently, my GeForce GTX 1050 only supports tier 1. |
The problem was exactly this. DX12 devices with Tier 1 resource heap support (or: every NVIDIA card from Kepler to Pascal!) require supported heap resource type to be declared in the flags, but create_heap only currently passes D3D12_HEAP_FLAGS(0) to the heap descriptor. So modifying the trianglell example and adding a custom create_heap_flagged function, I got it running the following way:
The best course of action in my view would be to expose separate create_texture_heap(), create_render_texture_heap() and create_buffer_heap() functions which simply map to create_heap() in the vulkanll and metall factory.rs. |
I don't understand how Vulkan efficiently runs on that tier-1 hardware, given that the memory you allocate there doesn't have the type of resources specified in advance. |
Well, it runs. I leave the rest to your discretion. |
When attempting to compile and run the trianglell example on Windows 10 64 bit MSVC with the default DX12 backend, the program panics at runtime with the following message:
The create_heap function asserts that
Commenting this out, the example simply fails to run without providing a backtrace.
The example works fine compiled with with
--features vulkan
.The text was updated successfully, but these errors were encountered: