Skip to content
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

Fix invalid argument for DX12 CreateHeap #8

Merged
merged 3 commits into from
Jan 6, 2022

Conversation

stephenap07
Copy link
Contributor

This adds a heap tier check because the D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES flag is not supported for heap tier 1. I tested this on Windows 10 SDK 10.0.19041.0 and 10.0.20348.0.

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@stephenap07
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@apanteleev
Copy link
Collaborator

Thanks!

One suggestion, rewrite the heap tier test like so:

if (ResourceHeapTier == TIER_1)
    Flags = ONLY_RT_DS_TEXTURES;
else
    Flags = ALL_BUFFERS_AND_TEXTURES;

So that if a heap tier 3 is ever added, it won't break the existing code.

@stephenap07
Copy link
Contributor Author

Sounds good. Updated.

@apanteleev apanteleev merged commit ff226c6 into NVIDIA-RTX:main Jan 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants