Skip to content

Commit

Permalink
fix use of SLANG_RHI_ENABLE_NVAPI (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV authored Oct 11, 2024
1 parent dcaebd1 commit 9d13bd4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/d3d12/d3d12-helper-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "d3d12-query.h"
#include "d3d12-transient-heap.h"

#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
#include "../nvapi/nvapi-include.h"
#endif

Expand All @@ -21,7 +21,7 @@ namespace rhi::d3d12 {

bool isSupportedNVAPIOp(ID3D12Device* dev, uint32_t op)
{
#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
{
bool isSupported;
NvAPI_Status status = NvAPI_D3D12_IsNvShaderExtnOpCodeSupported(dev, NvU32(op), &isSupported);
Expand Down
4 changes: 2 additions & 2 deletions src/d3d12/d3d12-pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "d3d12-shader-program.h"
#include "d3d12-input-layout.h"

#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
#include "../nvapi/nvapi-include.h"
#endif

Expand Down Expand Up @@ -255,7 +255,7 @@ Result DeviceImpl::createComputePipeline2(const ComputePipelineDesc2& desc, ICom
: program->m_rootObjectLayout->m_rootSignature;
computeDesc.CS = {program->m_shaders[0].code.data(), SIZE_T(program->m_shaders[0].code.size())};

#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
if (m_nvapi)
{
// Also fill the extension structure.
Expand Down
2 changes: 1 addition & 1 deletion src/nvapi/nvapi-include.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// A helper that makes the NVAPI available across targets

#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
// On windows if we include NVAPI, we must include windows.h first

#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion src/nvapi/nvapi-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static Result g_initStatus = SLANG_E_UNINITIALIZED;

Result NVAPIUtil::initialize()
{
#ifdef SLANG_RHI_ENABLE_NVAPI
#if SLANG_RHI_ENABLE_NVAPI
if (g_initStatus == SLANG_E_UNINITIALIZED)
{
NvAPI_Status ret = NVAPI_OK;
Expand Down

0 comments on commit 9d13bd4

Please sign in to comment.