mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Fetch physical device format properties
This commit is contained in:
@@ -181,6 +181,7 @@ private:
|
||||
VkPhysicalDeviceFeatures features;
|
||||
VkPhysicalDeviceProperties props;
|
||||
VkPhysicalDeviceMemoryProperties memProps;
|
||||
VkFormatProperties fmtprops[VK_FORMAT_NUM];
|
||||
};
|
||||
|
||||
VkInstance m_Instance; // the instance corresponding to this WrappedVulkan
|
||||
@@ -229,6 +230,8 @@ private:
|
||||
{ return m_PhysicalDeviceData.features; }
|
||||
const VkPhysicalDeviceProperties &GetDeviceProps()
|
||||
{ return m_PhysicalDeviceData.props; }
|
||||
const VkFormatProperties &GetFormatProperties(VkFormat f)
|
||||
{ return m_PhysicalDeviceData.fmtprops[f]; }
|
||||
|
||||
uint32_t GetReadbackMemoryIndex(uint32_t resourceRequiredBitmask);
|
||||
uint32_t GetUploadMemoryIndex(uint32_t resourceRequiredBitmask);
|
||||
|
||||
@@ -564,6 +564,9 @@ bool WrappedVulkan::Serialise_vkCreateDevice(
|
||||
|
||||
ObjDisp(physicalDevice)->GetPhysicalDeviceFeatures(Unwrap(physicalDevice), &m_PhysicalDeviceData.features);
|
||||
|
||||
for(int i=VK_FORMAT_BEGIN_RANGE+1; i < VK_FORMAT_END_RANGE; i++)
|
||||
ObjDisp(physicalDevice)->GetPhysicalDeviceFormatProperties(Unwrap(physicalDevice), VkFormat(i), &m_PhysicalDeviceData.fmtprops[i]);
|
||||
|
||||
m_PhysicalDeviceData.readbackMemIndex = m_PhysicalDeviceData.GetMemoryIndex(~0U, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT);
|
||||
m_PhysicalDeviceData.uploadMemIndex = m_PhysicalDeviceData.GetMemoryIndex(~0U, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, 0);
|
||||
m_PhysicalDeviceData.GPULocalMemIndex = m_PhysicalDeviceData.GetMemoryIndex(~0U, VK_MEMORY_PROPERTY_DEVICE_ONLY, 0);
|
||||
|
||||
Reference in New Issue
Block a user