summaryrefslogtreecommitdiffstats
path: root/tools/gfx/open-gl/render-gl.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-08-24 14:26:27 -0400
committerGitHub <noreply@github.com>2020-08-24 11:26:27 -0700
commit67ca54997d445e15891965b8d77561b9d10bb18c (patch)
tree8719fb2ff6a42f24daef5ca77d046a55b56d5b98 /tools/gfx/open-gl/render-gl.cpp
parentfcac02e405661de311b5ceebbd6d3e2c78bf8aea (diff)
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.
Diffstat (limited to 'tools/gfx/open-gl/render-gl.cpp')
-rw-r--r--tools/gfx/open-gl/render-gl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gfx/open-gl/render-gl.cpp b/tools/gfx/open-gl/render-gl.cpp
index 5f16f07bc..caf8794c0 100644
--- a/tools/gfx/open-gl/render-gl.cpp
+++ b/tools/gfx/open-gl/render-gl.cpp
@@ -717,9 +717,12 @@ SlangResult GLRenderer::initialize(const Desc& desc, void* inWindowHandle)
}
}
- if (m_desc.requiredFeatures.indexOf("nvapi") >= 0 && SLANG_SUCCEEDED(NVAPIUtil::initialize()))
+ if (m_desc.nvapiExtnSlot >= 0)
{
- m_features.add("nvapi");
+ if (SLANG_FAILED(NVAPIUtil::initialize()))
+ {
+ return SLANG_E_NOT_AVAILABLE;
+ }
}
auto extensions = glGetString(GL_EXTENSIONS);