From 67ca54997d445e15891965b8d77561b9d10bb18c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 24 Aug 2020 14:26:27 -0400 Subject: NVAPI improvements (#1512) * First pass at incorporating nvapi into test harness. * D3d12 Atomic Float Add via NVAPI working * Dx12 atomic float appears to work. * Atomic float add on Dx12. * Added atomic64 feature addition to vk. Fix correct output for atomic-float-byte-address.slang * Disable atomic float failing tests. * Upgraded VK headers. * Detect atomic float availability on VK. * Try to get test working for in64 atomic. * Made HLSL prelude controlled via the render-test requirements. * Added -enable-nvapi to premake. * Fix D3D12Renderer when NVAPI is not available. * Small improvements to VKRenderer. * Improve atomic documentation in target-compatibility.md. * Fixed NVAPI working on D3D12. * Test for specific NVAPI features. * Remove requiredFeatures from Renderer::Desc as was ignored. Tried to document more around nvapiExtnSlot. * Readded requiredFeatures to Renderer::Desc * Improve comments in the tests. --- tools/gfx/render.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/gfx/render.h') diff --git a/tools/gfx/render.h b/tools/gfx/render.h index 12ef1a9e9..55beb5774 100644 --- a/tools/gfx/render.h +++ b/tools/gfx/render.h @@ -800,12 +800,14 @@ public: struct Desc { - int width; ///< Width in pixels - int height; ///< height in pixels + int width = 0; ///< Width in pixels + int height = 0; ///< height in pixels Slang::String adapter; ///< Name to identify the adapter to use - Slang::List requiredFeatures; ///< The features enabled on this renderer + Slang::List requiredFeatures; ///< List of required feature names. + int nvapiExtnSlot = -1; ///< The slot (typically UAV) used to identify NVAPI intrinsics. If >=0 NVAPI is required. }; + // Will return with SLANG_E_NOT_AVAILABLE if NVAPI can't be initialized and nvapiExtnSlot >= 0 virtual SlangResult initialize(const Desc& desc, void* inWindowHandle) = 0; bool hasFeature(const Slang::UnownedStringSlice& feature) { return getFeatures().indexOf(Slang::String(feature)) != Slang::Index(-1); } -- cgit v1.2.3