Add AGS lib to D3D11 for efficient UAV writes overlaps on AMD GPUs

This commit is contained in:
Wojtek Figat
2025-08-10 17:16:36 +02:00
parent bc0e1f81e7
commit d109e5ca9f
4 changed files with 61 additions and 2 deletions

View File

@@ -18,6 +18,10 @@
#include <ThirdParty/nvapi/nvapi.h>
extern bool EnableNvapi;
#endif
#if COMPILE_WITH_AGS
#include <ThirdParty/AGS/amd_ags.h>
extern AGSContext* AgsContext;
#endif
#define DX11_CLEAR_SR_ON_STAGE_DISABLE 0
@@ -920,7 +924,16 @@ void GPUContextDX11::OverlapUA(bool end)
return;
}
#endif
// TODO: add support for AMD extensions to overlap UAV writes (agsDriverExtensionsDX11_BeginUAVOverlap/agsDriverExtensionsDX11_EndUAVOverlap)
#if COMPILE_WITH_AGS
if (AgsContext)
{
if (end)
agsDriverExtensionsDX11_EndUAVOverlap(AgsContext, _context);
else
agsDriverExtensionsDX11_BeginUAVOverlap(AgsContext, _context);
return;
}
#endif
// TODO: add support for Intel extensions to overlap UAV writes (INTC_D3D11_BeginUAVOverlap/INTC_D3D11_EndUAVOverlap)
}