summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d12
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/d3d12')
-rw-r--r--tools/gfx/d3d12/d3d12-device.cpp9
-rw-r--r--tools/gfx/d3d12/d3d12-pipeline-state.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp
index 8f1a3e366..312c81d75 100644
--- a/tools/gfx/d3d12/d3d12-device.cpp
+++ b/tools/gfx/d3d12/d3d12-device.cpp
@@ -24,6 +24,10 @@
# define ENABLE_DEBUG_LAYER 0
#endif
+#ifdef GFX_NVAPI
+# include "../nvapi/nvapi-include.h"
+#endif
+
namespace gfx
{
namespace d3d12
@@ -597,6 +601,11 @@ Result DeviceImpl::initialize(const Desc& desc)
m_features.add("atomic-float");
}
+ // If we have NVAPI well assume we have realtime clock
+ {
+ m_features.add("realtime-clock");
+ }
+
m_nvapi = true;
#endif
}
diff --git a/tools/gfx/d3d12/d3d12-pipeline-state.cpp b/tools/gfx/d3d12/d3d12-pipeline-state.cpp
index adfdcd518..35313f676 100644
--- a/tools/gfx/d3d12/d3d12-pipeline-state.cpp
+++ b/tools/gfx/d3d12/d3d12-pipeline-state.cpp
@@ -240,7 +240,7 @@ Result PipelineStateImpl::ensureAPIPipelineStateCreated()
SIZE_T(programImpl->m_shaders[0].code.getCount()) };
#ifdef GFX_NVAPI
- if (m_nvapi)
+ if (m_device->m_nvapi)
{
// Also fill the extension structure.
// Use the same UAV slot index and register space that are declared in the shader.