Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix use of SLANG_RHI_ENABLE_NVAPI #77

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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