Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jp7677/dxvk-nvapi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Peters <jp7677@gmail.com>2021-09-28 07:57:31 +0300
committerJens Peters <jp7677@gmail.com>2021-09-28 07:57:31 +0300
commit6ccfaecb2b2fcf9f394168a7528ec25c55e17dab (patch)
tree972247e30063376e14983cf04ba7b520aa5756f3
parent2a4ebbd6ae03e20d7383bd2bdf9e7896d0500c16 (diff)
nvapi-d3d12: Whitespaces
-rw-r--r--src/d3d12/nvapi_d3d12_device.cpp16
-rw-r--r--src/nvapi_d3d12.cpp12
2 files changed, 14 insertions, 14 deletions
diff --git a/src/d3d12/nvapi_d3d12_device.cpp b/src/d3d12/nvapi_d3d12_device.cpp
index 3801864..a236d14 100644
--- a/src/d3d12/nvapi_d3d12_device.cpp
+++ b/src/d3d12/nvapi_d3d12_device.cpp
@@ -4,7 +4,7 @@ namespace dxvk {
bool NvapiD3d12Device::CreateCubinComputeShaderWithName(ID3D12Device* device, const void* cubinData, NvU32 cubinSize, NvU32 blockX, NvU32 blockY, NvU32 blockZ, const char* shaderName, NVDX_ObjectHandle* pShader){
auto cubinDevice = GetCubinDevice(device);
- if(cubinDevice == nullptr)
+ if (cubinDevice == nullptr)
return false;
return cubinDevice->CreateCubinComputeShaderWithName(cubinData, cubinSize, blockX, blockY, blockZ, shaderName, reinterpret_cast<D3D12_CUBIN_DATA_HANDLE**>(pShader)) >= 0 ;
@@ -12,7 +12,7 @@ namespace dxvk {
bool NvapiD3d12Device::DestroyCubinComputeShader(ID3D12Device* device, NVDX_ObjectHandle shader) {
auto cubinDevice = GetCubinDevice(device);
- if(cubinDevice == nullptr)
+ if (cubinDevice == nullptr)
return false;
return cubinDevice->DestroyCubinComputeShader(reinterpret_cast<D3D12_CUBIN_DATA_HANDLE*>(shader)) >= 0;
@@ -20,7 +20,7 @@ namespace dxvk {
bool NvapiD3d12Device::GetCudaTextureObject(ID3D12Device* device, D3D12_CPU_DESCRIPTOR_HANDLE srvHandle, D3D12_CPU_DESCRIPTOR_HANDLE samplerHandle, NvU32* cudaTextureHandle) {
auto cubinDevice = GetCubinDevice(device);
- if(cubinDevice == nullptr)
+ if (cubinDevice == nullptr)
return false;
return cubinDevice->GetCudaTextureObject(srvHandle, samplerHandle, reinterpret_cast<UINT32*>(cudaTextureHandle)) >= 0;
@@ -29,7 +29,7 @@ namespace dxvk {
bool NvapiD3d12Device::GetCudaSurfaceObject(ID3D12Device* device, D3D12_CPU_DESCRIPTOR_HANDLE uavHandle, NvU32* cudaSurfaceHandle) {
auto cubinDevice = GetCubinDevice(device);
- if(cubinDevice == nullptr)
+ if (cubinDevice == nullptr)
return false;
return cubinDevice->GetCudaSurfaceObject(uavHandle, reinterpret_cast<UINT32*>(cudaSurfaceHandle)) >= 0;
@@ -37,7 +37,7 @@ namespace dxvk {
bool NvapiD3d12Device::LaunchCubinShader(ID3D12GraphicsCommandList* commandList, NVDX_ObjectHandle pShader, NvU32 blockX, NvU32 blockY, NvU32 blockZ, const void* params, NvU32 paramSize) {
auto commandListExt = GetCommandListExt(commandList);
- if(commandListExt == nullptr)
+ if (commandListExt == nullptr)
return false;
return commandListExt->LaunchCubinShader(reinterpret_cast<D3D12_CUBIN_DATA_HANDLE*>(pShader), blockX, blockY, blockZ, params, paramSize) >= 0;
@@ -45,7 +45,7 @@ namespace dxvk {
bool NvapiD3d12Device::CaptureUAVInfo(ID3D12Device* device, NVAPI_UAV_INFO* pUAVInfo) {
auto cubinDevice = GetCubinDevice(device);
- if(cubinDevice == nullptr)
+ if (cubinDevice == nullptr)
return false;
return cubinDevice->CaptureUAVInfo(reinterpret_cast<D3D12_UAV_INFO*>(pUAVInfo)) >= 0;
@@ -61,11 +61,11 @@ namespace dxvk {
Com<ID3D12DeviceExt> NvapiD3d12Device::GetCubinDevice(ID3D12Device* device) {
std::scoped_lock lock(m_CubinDeviceMutex);
auto it = m_cubinDeviceMap.find(device);
- if(it != m_cubinDeviceMap.end())
+ if (it != m_cubinDeviceMap.end())
return it->second;
auto cubinDevice = GetDeviceExt(device, D3D12_VK_NVX_BINARY_IMPORT);
- if(cubinDevice != nullptr)
+ if (cubinDevice != nullptr)
m_cubinDeviceMap.emplace(device, cubinDevice.ptr());
return cubinDevice;
diff --git a/src/nvapi_d3d12.cpp b/src/nvapi_d3d12.cpp
index 8f7b9ac..8de8432 100644
--- a/src/nvapi_d3d12.cpp
+++ b/src/nvapi_d3d12.cpp
@@ -87,7 +87,7 @@ extern "C" {
if (pCmdList == nullptr)
return InvalidArgument(n);
- if(!NvapiD3d12Device::LaunchCubinShader(pCmdList, pShader, blockX, blockY, blockZ, params, paramSize))
+ if (!NvapiD3d12Device::LaunchCubinShader(pCmdList, pShader, blockX, blockY, blockZ, params, paramSize))
return Error(n, alreadyLoggedError);
return Ok(n, alreadyLoggedOk);
@@ -98,10 +98,10 @@ extern "C" {
static bool alreadyLoggedError = false;
static bool alreadyLoggedOk = false;
- if(pDevice == nullptr)
+ if (pDevice == nullptr)
return InvalidArgument(n);
- if(!NvapiD3d12Device::CaptureUAVInfo(pDevice, pUAVInfo))
+ if (!NvapiD3d12Device::CaptureUAVInfo(pDevice, pUAVInfo))
return Error(n, alreadyLoggedError);
return Ok(n, alreadyLoggedOk);
@@ -111,7 +111,7 @@ extern "C" {
constexpr auto n = __func__;
static bool alreadyLogged = false;
- if(pDevice == nullptr || structVersion != NV_D3D12_GRAPHICS_CAPS_VER1)
+ if (pDevice == nullptr || structVersion != NV_D3D12_GRAPHICS_CAPS_VER1)
return InvalidArgument(n);
// Currently we do not require these fields, we can implement them later.
@@ -131,11 +131,11 @@ extern "C" {
static bool alreadyLoggedError = false;
static bool alreadyLoggedOk = false;
- if(pDevice == nullptr)
+ if (pDevice == nullptr)
return InvalidArgument(n);
*isSupported = NvapiD3d12Device::IsFatbinPTXSupported(pDevice);
- if(!*isSupported)
+ if (!*isSupported)
return Error(n, alreadyLoggedError);
return Ok(n, alreadyLoggedOk);