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:
@@ -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
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user