-
Notifications
You must be signed in to change notification settings - Fork 27
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
[RFE] Utilize "enhanced barriers", reach parity with VK #35
Comments
dzhdanNV
changed the title
[RFE][D3D12] Utilize "enhanced barriers"
[RFE] Utilize "enhanced barriers", reach parity with VK
Feb 2, 2024
API changes: this API instead of old one: NRI_STRUCT(AccessDependency)
{
NRI_NAME(AccessBits) acessBits;
NRI_NAME(Dependency) dependency;
};
NRI_STRUCT(AccessDependencyLayout)
{
NRI_NAME(AccessBits) acessBits;
NRI_NAME(Dependency) dependency;
NRI_NAME(TextureLayout) layout;
};
NRI_STRUCT(GlobalBarrierDesc)
{
NRI_NAME(AccessDependency) before;
NRI_NAME(AccessDependency) after;
};
NRI_STRUCT(BufferBarrierDesc)
{
NRI_NAME(Buffer)* buffer;
NRI_NAME(AccessDependency) before;
NRI_NAME(AccessDependency) after;
};
NRI_STRUCT(TextureBarrierDesc)
{
NRI_NAME(Texture)* texture;
NRI_NAME(AccessDependencyLayout) before;
NRI_NAME(AccessDependencyLayout) after;
NRI_NAME(Mip_t) mipOffset;
NRI_NAME(Mip_t) mipNum;
NRI_NAME(Dim_t) arrayOffset;
NRI_NAME(Dim_t) arraySize;
};
NRI_STRUCT(BarrierGroupDesc)
{
const NRI_NAME(GlobalBarrierDesc)* globalBarriers;
const NRI_NAME(BufferBarrierDesc)* bufferBarriers;
const NRI_NAME(TextureBarrierDesc)* textureBarriers;
uint32_t globalBarrierNum;
uint32_t bufferBarrierNum;
uint32_t textureBarrierNum;
};
// Barrier (can be used inside "Graphics" but with limited functionality)
void (NRI_CALL *CmdBarrier)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(BarrierGroupDesc)* barrierGroup); |
If Agility SDK is not enabled, "legacy barriers" will be used to implement this API in D3D12, but:
|
Implemented. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://microsoft.github.io/DirectX-Specs/d3d/D3D12EnhancedBarriers.html
It should help to make D3D12 backend closer to VK (with legacy resource states there are some hidden discrepancies). According to the spec "resource transitions" are emulated using "enhanced barriers" API under the hood.
The text was updated successfully, but these errors were encountered: