summaryrefslogtreecommitdiffstats
path: root/tools/gfx/nvapi/nvapi-util.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-08-21 16:04:42 -0400
committerGitHub <noreply@github.com>2020-08-21 13:04:42 -0700
commitfcac02e405661de311b5ceebbd6d3e2c78bf8aea (patch)
tree6e79865b39f0739d2ac9c3f91cc4129c244b6977 /tools/gfx/nvapi/nvapi-util.h
parent49067fd2e97b40649df3fa2ce096f78c2e45da5a (diff)
Vulkan update/NVAPI support (#1511)
* 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.
Diffstat (limited to 'tools/gfx/nvapi/nvapi-util.h')
-rw-r--r--tools/gfx/nvapi/nvapi-util.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/gfx/nvapi/nvapi-util.h b/tools/gfx/nvapi/nvapi-util.h
new file mode 100644
index 000000000..704f4ede4
--- /dev/null
+++ b/tools/gfx/nvapi/nvapi-util.h
@@ -0,0 +1,19 @@
+// nvapi-util.h
+#pragma once
+
+#include "../../slang-com-helper.h"
+#include "../../slang-com-ptr.h"
+
+namespace gfx {
+
+struct NVAPIUtil
+{
+ /// Set up NVAPI for use. Must be called before any other function is used.
+ static SlangResult initialize();
+ /// True if the NVAPI is available, can be called even if initialize fails.
+ /// If initialize has not been called will return false
+ static bool isAvailable();
+};
+
+
+} // gfx