Fix GetNativePtr on Vulkan
This commit is contained in:
@@ -783,7 +783,7 @@ void GPUContextVulkan::EventEnd()
|
||||
void* GPUContextVulkan::GetNativePtr() const
|
||||
{
|
||||
const auto cmdBuffer = _cmdBufferManager->GetCmdBuffer();
|
||||
return (void*)cmdBuffer;
|
||||
return (void*)cmdBuffer->GetHandle();
|
||||
}
|
||||
|
||||
bool GPUContextVulkan::IsDepthBufferBinded()
|
||||
|
||||
@@ -1486,7 +1486,10 @@ GPUAdapter* GPUDeviceVulkan::GetAdapter() const
|
||||
|
||||
void* GPUDeviceVulkan::GetNativePtr() const
|
||||
{
|
||||
return static_cast<void*>(Device);
|
||||
// Return both Instance and Device as pointer to void*[2]
|
||||
_nativePtr[0] = (void*)Instance;
|
||||
_nativePtr[1] = (void*)Device;
|
||||
return _nativePtr;
|
||||
}
|
||||
|
||||
static int32 GetMaxSampleCount(VkSampleCountFlags counts)
|
||||
|
||||
@@ -459,6 +459,7 @@ class GPUDeviceVulkan : public GPUDevice
|
||||
private:
|
||||
|
||||
CriticalSection _fenceLock;
|
||||
mutable void* _nativePtr[2];
|
||||
|
||||
Dictionary<RenderTargetLayoutVulkan, RenderPassVulkan*> _renderPasses;
|
||||
Dictionary<FramebufferVulkan::Key, FramebufferVulkan*> _framebuffers;
|
||||
|
||||
@@ -111,7 +111,6 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the Vulkan image handle.
|
||||
/// </summary>
|
||||
/// <returns>The image handle.</returns>
|
||||
FORCE_INLINE VkImage GetHandle() const
|
||||
{
|
||||
return _image;
|
||||
|
||||
Reference in New Issue
Block a user