Add functions for openVR integration (#931)

* Add functions for openVR integration

* Update wiGraphicsDevice_DX12.h

* Update wiGraphicsDevice_DX12.cpp

* Update wiGraphicsDevice_Vulkan.h

* Update wiGraphicsDevice_Vulkan.cpp
This commit is contained in:
Cédric
2024-08-28 10:51:45 +02:00
committed by GitHub
parent 7b83a1e8dc
commit 30ac1da7df
4 changed files with 46 additions and 2 deletions
+8 -1
View File
@@ -7887,7 +7887,14 @@ std::mutex queue_locker;
PIXSetMarker(commandlist.GetGraphicsCommandList(), 0xFFFF0000, text);
}
}
ID3D12Resource* GraphicsDevice_DX12::GetTextureInternalResource(const Texture* texture)
{
return to_internal(texture)->resource.Get();
}
ID3D12CommandQueue* GraphicsDevice_DX12::GetGraphicsCommandQueue()
{
return queues[QUEUE_GRAPHICS].queue.Get();
}
}
#endif // WICKEDENGINE_BUILD_DX12
+3
View File
@@ -430,6 +430,9 @@ namespace wi::graphics
return GetCommandList(cmd).frame_allocators[GetBufferIndex()];
}
ID3D12Resource* GetTextureInternalResource(const Texture* texture);
ID3D12CommandQueue* GetGraphicsCommandQueue();
struct DescriptorHeapGPU
{
D3D12_DESCRIPTOR_HEAP_DESC heapDesc = {};
+28 -1
View File
@@ -2435,6 +2435,10 @@ using namespace vulkan_internal;
{
instanceExtensions.push_back(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME);
}
else if (strcmp(availableExtension.extensionName, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME) == 0)
{
instanceExtensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
}
}
instanceExtensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
@@ -9334,7 +9338,30 @@ using namespace vulkan_internal;
label.color[3] = 1.0f;
vkCmdInsertDebugUtilsLabelEXT(commandlist.GetCommandBuffer(), &label);
}
VkDevice GraphicsDevice_Vulkan::GetDevice()
{
return device;
}
VkImage GraphicsDevice_Vulkan::GetTextureInternalResource(const Texture* texture)
{
return to_internal(texture)->resource;
}
VkPhysicalDevice GraphicsDevice_Vulkan::GetPhysicalDevice()
{
return physicalDevice;
}
VkInstance GraphicsDevice_Vulkan::GetInstance()
{
return instance;
}
VkQueue GraphicsDevice_Vulkan::GetGraphicsCommandQueue()
{
return queues[QUEUE_GRAPHICS].queue;
}
uint32_t GraphicsDevice_Vulkan::GetGraphicsFamilyIndex()
{
return graphicsFamily;
}
}
#endif // WICKEDENGINE_BUILD_VULKAN
+7
View File
@@ -461,6 +461,13 @@ namespace wi::graphics
return GetCommandList(cmd).frame_allocators[GetBufferIndex()];
}
VkDevice GetDevice();
VkImage GetTextureInternalResource(const Texture* texture);
VkPhysicalDevice GetPhysicalDevice();
VkInstance GetInstance();
VkQueue GetGraphicsCommandQueue();
uint32_t GetGraphicsFamilyIndex();
struct AllocationHandler
{
VmaAllocator allocator = VK_NULL_HANDLE;