Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita10fe8c

Browse files
liam-middlebrookjp7677
authored andcommitted
nvofapi: Migrate to dxvk namespace
1 parent17c750e commita10fe8c

11 files changed

+26
-27
lines changed

‎src/d3d12/nvofapi_d3d12_instance.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include"d3d12/nvofapi_d3d12_instance.h"
3030

31-
namespacenvofapi {
31+
namespacedxvk {
3232

3333
NvOFInstanceD3D12::NvOFInstanceD3D12(ID3D12Device* pD3D12Device) {
3434
// Query for the extension interface
@@ -55,7 +55,7 @@ namespace nvofapi {
5555

5656
// Confirm that OPTICAL_FLOW extension is available
5757
if (!m_deviceExt->GetExtensionSupport(D3D12_VK_NV_OPTICAL_FLOW)) {
58-
dxvk::log::info("Missing VK_NV_optical_flow extension!");
58+
log::info("Missing VK_NV_optical_flow extension!");
5959
returnfalse;
6060
}
6161

@@ -92,8 +92,8 @@ namespace nvofapi {
9292

9393
voidNvOFInstanceD3D12::RegisterBuffer(const NV_OF_REGISTER_RESOURCE_PARAMS_D3D12* registerParams) {
9494
NV_OF_REGISTER_RESOURCE_PARAMS_VK vkParams{};
95-
dxvk::log::info(
96-
dxvk::str::format("RegisterBuffer DX: resource:",
95+
log::info(
96+
str::format("RegisterBuffer DX: resource:",
9797
registerParams->resource," inputFencePoint:",
9898
registerParams->inputFencePoint.fence," outputFencePoint:",
9999
registerParams->outputFencePoint.fence));

‎src/d3d12/nvofapi_d3d12_instance.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include"nvofapi/nvofapi_instance.h"
2727

28-
namespacenvofapi {
28+
namespacedxvk {
2929
classNvOFInstanceD3D12 :publicNvOFInstance {
3030

3131
public:

‎src/nvofapi.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern "C" {
3939
if (log::tracing())
4040
log::trace(n,log::fmt::hnd(hOf),log::fmt::ptr(initParams));
4141

42-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstance*>(hOf);
42+
auto nvOF =reinterpret_cast<NvOFInstance*>(hOf);
4343

4444
if (!nvOF) {
4545
returnErrorGeneric(n);
@@ -54,7 +54,7 @@ extern "C" {
5454
if (log::tracing())
5555
log::trace(n,log::fmt::hnd(hOf));
5656

57-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstance*>(hOf);
57+
auto nvOF =reinterpret_cast<NvOFInstance*>(hOf);
5858
if (!nvOF) {
5959
returnErrorGeneric(n);
6060
}
@@ -78,7 +78,7 @@ extern "C" {
7878
if (log::tracing())
7979
log::trace(n,log::fmt::hnd(hOf), capsParam,log::fmt::ptr(capsVal),log::fmt::ptr(size));
8080

81-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstance*>(hOf);
81+
auto nvOF =reinterpret_cast<NvOFInstance*>(hOf);
8282

8383
return nvOF->getCaps(capsParam, capsVal, size);
8484
}

‎src/nvofapi/nvofapi_common.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
#include"nvofapi_image.h"
3131
#include"nvofapi_instance.h"
3232

33-
usingnamespacedxvk;
34-
namespacenvofapi {
33+
namespacedxvk {
3534

3635
typedefstructNV_OF_PRIV_DATA {
3736
uint32_t size;

‎src/nvofapi/nvofapi_image.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include"nvofapi_image.h"
2525

26-
namespacenvofapi {
26+
namespacedxvk {
2727
boolNvOFImage::Initialize(PFN_vkCreateImageView fpCreateImageView,
2828
PFN_vkDestroyImageView fpDestroyImageView) {
2929
m_vkDestroyImageView = fpDestroyImageView;

‎src/nvofapi/nvofapi_image.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include<vulkan/vulkan_core.h>
2525

26-
namespacenvofapi {
26+
namespacedxvk {
2727
classNvOFImage {
2828
public:
2929
NvOFImage(VkDevice device, VkImage image, VkFormat format) : m_vkDevice(device), m_image(image), m_format(format) {

‎src/nvofapi/nvofapi_instance.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include"../inc/nvofapi/nvOpticalFlowD3D12.h"
2828
#include"../inc/nvofapi/nvOpticalFlowVulkan.h"
2929

30-
namespacenvofapi {
30+
namespacedxvk {
3131
constexpruint32_t CMDS_IN_FLIGHT =8;
3232

3333
classNvOFInstance {

‎src/nvofapi_d3d12.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ extern "C" {
4141
if (log::tracing())
4242
log::trace(n,log::fmt::ptr(pD3D12Device),log::fmt::ptr(hOFInstance));
4343

44-
nvofapi::NvOFInstanceD3D12* nvOF =nullptr;
44+
NvOFInstanceD3D12* nvOF =nullptr;
4545
try {
46-
nvOF =newnvofapi::NvOFInstanceD3D12(pD3D12Device);
46+
nvOF =newNvOFInstanceD3D12(pD3D12Device);
4747
}catch (std::exceptionconst& e) {
4848
log::info(str::format("CreateOpticalFlowD3D12 exception, %s", e.what()));
4949
returnErrorGeneric(n);
@@ -87,7 +87,7 @@ extern "C" {
8787
if (log::tracing())
8888
log::trace(n,log::fmt::hnd(hOf),log::fmt::ptr(registerParams));
8989

90-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstanceD3D12*>(hOf);
90+
auto nvOF =reinterpret_cast<NvOFInstanceD3D12*>(hOf);
9191

9292
nvOF->RegisterBuffer(registerParams);
9393
returnSuccess(n);
@@ -99,7 +99,7 @@ extern "C" {
9999
if (log::tracing())
100100
log::trace(n,log::fmt::ptr(registerParams));
101101

102-
nvofapi::NvOFImage* nvRes =reinterpret_cast<nvofapi::NvOFImage*>(registerParams->hOFGpuBuffer);
102+
NvOFImage* nvRes =reinterpret_cast<NvOFImage*>(registerParams->hOFGpuBuffer);
103103
delete nvRes;
104104
returnSuccess(n);
105105
}
@@ -111,7 +111,7 @@ extern "C" {
111111
if (log::tracing())
112112
log::trace(n,log::fmt::hnd(hOf),log::fmt::ptr(executeInParams),log::fmt::ptr(executeOutParams));
113113

114-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstanceD3D12*>(hOf);
114+
auto nvOF =reinterpret_cast<NvOFInstanceD3D12*>(hOf);
115115

116116
nvOF->Execute(executeInParams, executeOutParams);
117117
returnSuccess(n, alreadyLoggedOk);

‎src/nvofapi_vulkan.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ extern "C" {
4040
if (log::tracing())
4141
log::trace(n,log::fmt::hnd(vkInstance),log::fmt::hnd(vkPhysicalDevice),log::fmt::hnd(vkDevice),log::fmt::ptr(hOFInstance));
4242

43-
nvofapi::NvOFInstanceVk* nvOF =nullptr;
43+
NvOFInstanceVk* nvOF =nullptr;
4444
try {
45-
nvOF =newnvofapi::NvOFInstanceVk(vkInstance, vkPhysicalDevice, vkDevice);
45+
nvOF =newNvOFInstanceVk(vkInstance, vkPhysicalDevice, vkDevice);
4646
}catch (std::exceptionconst& e) {
4747
log::info(str::format("CreateOpticalFlowD3D12 exception, %s", e.what()));
4848
returnErrorGeneric(n);
@@ -81,7 +81,7 @@ extern "C" {
8181
if (log::tracing())
8282
log::trace(n,log::fmt::hnd(hOf),log::fmt::ptr(registerParams));
8383

84-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstanceVk*>(hOf);
84+
auto nvOF =reinterpret_cast<NvOFInstanceVk*>(hOf);
8585
nvOF->RegisterBuffer(registerParams);
8686
returnSuccess(n);
8787
}
@@ -92,7 +92,7 @@ extern "C" {
9292
if (log::tracing())
9393
log::trace(n,log::fmt::ptr(registerParams));
9494

95-
nvofapi::NvOFImage* nvRes =reinterpret_cast<nvofapi::NvOFImage*>(registerParams->hOFGpuBuffer);
95+
NvOFImage* nvRes =reinterpret_cast<NvOFImage*>(registerParams->hOFGpuBuffer);
9696
delete nvRes;
9797
returnErrorGeneric(n);
9898
}
@@ -104,7 +104,7 @@ extern "C" {
104104
if (log::tracing())
105105
log::trace(n,log::fmt::hnd(hOf),log::fmt::ptr(executeInParams),log::fmt::ptr(executeOutParams));
106106

107-
auto nvOF =reinterpret_cast<nvofapi::NvOFInstanceVk*>(hOf);
107+
auto nvOF =reinterpret_cast<NvOFInstanceVk*>(hOf);
108108

109109
nvOF->Execute(executeInParams, executeOutParams);
110110
returnSuccess(n, alreadyLoggedOk);

‎src/vulkan/nvofapi_vulkan_instance.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include"vulkan/nvofapi_vulkan_instance.h"
3030

31-
namespacenvofapi {
31+
namespacedxvk {
3232

3333
boolNvOFInstanceVk::Initialize() {
3434
// For VK we cannot load winevulkan directly or we may break handle
@@ -90,8 +90,8 @@ namespace nvofapi {
9090
}
9191

9292
voidNvOFInstanceVk::Execute(const NV_OF_EXECUTE_INPUT_PARAMS_VK* inParams, NV_OF_EXECUTE_OUTPUT_PARAMS_VK* outParams) {
93-
dxvk::log::info(
94-
dxvk::str::format("OFExecuteVK params:",
93+
log::info(
94+
str::format("OFExecuteVK params:",
9595
" inputFrame:", inParams->inputFrame,
9696
" referenceFrame:", inParams->referenceFrame,
9797
" externalHints:", inParams->externalHints,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp