Skip to content

Commit 128fa39

Browse files
Bumped API version to 256001 + minor updates to OpenXR
1 parent adc3da7 commit 128fa39

File tree

7 files changed

+24
-6
lines changed

7 files changed

+24
-6
lines changed

Graphics/GraphicsEngine/interface/APIInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/// \file
3131
/// Diligent API information
3232

33-
#define DILIGENT_API_VERSION 256000
33+
#define DILIGENT_API_VERSION 256001
3434

3535
#include "../../../Primitives/interface/BasicTypes.h"
3636

Graphics/GraphicsEngine/src/EngineFactoryBase.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2024 Diligent Graphics LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -85,6 +85,14 @@ void VerifyEngineCreateInfo(const EngineCreateInfo& EngineCI, const GraphicsAdap
8585
LOG_ERROR_AND_THROW("Unknown queue priority");
8686
}
8787
}
88+
89+
if (EngineCI.pXRAttribs != nullptr && EngineCI.pXRAttribs->Instance != 0)
90+
{
91+
if (EngineCI.pXRAttribs->GetInstanceProcAddr == nullptr)
92+
{
93+
LOG_ERROR_AND_THROW("pXRAttribs->GetInstanceProcAddr must not be null if pXRAttribs->Instance is not null");
94+
}
95+
}
8896
}
8997

9098
} // namespace Diligent

Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void GetOpenXRAdapterRequirements(const OpenXRAttribs& XR, LUID& AdapterL
7676
return;
7777

7878
if (XR.GetInstanceProcAddr == nullptr)
79-
LOG_ERROR_AND_THROW("xrGetInstanceProcAddr must not be null");
79+
LOG_ERROR_AND_THROW("GetInstanceProcAddr must not be null");
8080

8181
XrInstance xrInstance = XR_NULL_HANDLE;
8282
static_assert(sizeof(xrInstance) == sizeof(XR.Instance), "XrInstance size mismatch");

Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static void GetOpenXRAdapterRequirements(const OpenXRAttribs& XR, LUID& AdapterL
7373
return;
7474

7575
if (XR.GetInstanceProcAddr == nullptr)
76-
LOG_ERROR_AND_THROW("xrGetInstanceProcAddr must not be null");
76+
LOG_ERROR_AND_THROW("GetInstanceProcAddr must not be null");
7777

7878
XrInstance xrInstance = XR_NULL_HANDLE;
7979
static_assert(sizeof(xrInstance) == sizeof(XR.Instance), "XrInstance size mismatch");

Graphics/GraphicsEngineOpenGL/include/OpenXR_GLHelpers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static Version GetOpenXRRequiredGLVersion(const OpenXRAttribs* pXR) noexcept(fal
5858
return {};
5959

6060
if (pXR->GetInstanceProcAddr == nullptr)
61-
LOG_ERROR_AND_THROW("xrGetInstanceProcAddr must not be null");
61+
LOG_ERROR_AND_THROW("GetInstanceProcAddr must not be null");
6262

6363
XrInstance xrInstance = XR_NULL_HANDLE;
6464
static_assert(sizeof(xrInstance) == sizeof(pXR->Instance), "XrInstance size mismatch");

Graphics/GraphicsTools/src/OpenXRUtilities.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ void AllocateOpenXRSwapchainImageDataGL(Uint32 ImageCount,
7171
void GetOpenXRSwapchainImageGL(IRenderDevice* pDevice,
7272
const XrSwapchainImageBaseHeader* ImageData,
7373
Uint32 ImageIndex,
74+
const TextureDesc& TexDesc,
7475
ITexture** ppImage);
7576
#endif
7677

@@ -229,7 +230,7 @@ void GetOpenXRSwapchainImage(IRenderDevice* pDevice,
229230
#if GL_SUPPORTED || GLES_SUPPORTED
230231
case RENDER_DEVICE_TYPE_GL:
231232
case RENDER_DEVICE_TYPE_GLES:
232-
GetOpenXRSwapchainImageGL(pDevice, ImageData, ImageIndex, ppImage);
233+
GetOpenXRSwapchainImageGL(pDevice, ImageData, ImageIndex, TexDesc, ppImage);
233234
break;
234235
#endif
235236

ReleaseHistory.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## Current progress
2+
3+
* Enabled OpenXR (API256001)
4+
* Added `OpenXRAttribs` struct and `pXRAttribs` member to `EngineCreateInfo` struct
5+
* Added `NativeGLContextAttribsWin32` and `NativeGLContextAttribsAndroid` structs and
6+
`IRenderDeviceGL::GetNativeGLContextAttribs` method
7+
* Added OpenXR utility functions (`GetOpenXRGraphicsBinding`, `DestroyOpenXRDebugUtilsMessenger`,
8+
`AllocateOpenXRSwapchainImageData`, and `GetOpenXRSwapchainImage`
9+
110
## v.2.5.6
211

312
* Implemented WebGPU backend

0 commit comments

Comments
 (0)