mirror of
https://github.com/simple64/simple64.git
synced 2026-07-11 01:24:00 +02:00
update parallel rdp
This commit is contained in:
@@ -1 +1 @@
|
||||
ffc0d865836eb2f90c85e4694e4cfe363be908e6
|
||||
43bc31642cc70d04adb828a285e68cdbde7110a9
|
||||
|
||||
@@ -3086,35 +3086,52 @@ void CommandBuffer::end()
|
||||
device->request_staging_block_nolock(staging_block, 0);
|
||||
}
|
||||
|
||||
void CommandBuffer::insert_label(const char *name, const float *color)
|
||||
{
|
||||
if (!device->ext.supports_debug_utils || !vkCmdInsertDebugUtilsLabelEXT)
|
||||
return;
|
||||
|
||||
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
|
||||
if (color)
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = color[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = 1.0f;
|
||||
}
|
||||
|
||||
info.pLabelName = name;
|
||||
vkCmdInsertDebugUtilsLabelEXT(cmd, &info);
|
||||
}
|
||||
|
||||
void CommandBuffer::begin_region(const char *name, const float *color)
|
||||
{
|
||||
if (device->ext.supports_debug_utils)
|
||||
{
|
||||
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
|
||||
if (color)
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = color[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = 1.0f;
|
||||
}
|
||||
if (!device->ext.supports_debug_utils || !vkCmdBeginDebugUtilsLabelEXT)
|
||||
return;
|
||||
|
||||
info.pLabelName = name;
|
||||
if (vkCmdBeginDebugUtilsLabelEXT)
|
||||
vkCmdBeginDebugUtilsLabelEXT(cmd, &info);
|
||||
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
|
||||
if (color)
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = color[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
info.color[i] = 1.0f;
|
||||
}
|
||||
|
||||
info.pLabelName = name;
|
||||
vkCmdBeginDebugUtilsLabelEXT(cmd, &info);
|
||||
}
|
||||
|
||||
void CommandBuffer::end_region()
|
||||
{
|
||||
if (device->ext.supports_debug_utils)
|
||||
{
|
||||
if (vkCmdEndDebugUtilsLabelEXT)
|
||||
vkCmdEndDebugUtilsLabelEXT(cmd);
|
||||
}
|
||||
if (device->ext.supports_debug_utils && vkCmdEndDebugUtilsLabelEXT)
|
||||
vkCmdEndDebugUtilsLabelEXT(cmd);
|
||||
}
|
||||
|
||||
void CommandBuffer::enable_profiling()
|
||||
|
||||
@@ -301,6 +301,7 @@ public:
|
||||
}
|
||||
|
||||
void begin_region(const char *name, const float *color = nullptr);
|
||||
void insert_label(const char *name, const float *color = nullptr);
|
||||
void end_region();
|
||||
|
||||
Device &get_device()
|
||||
|
||||
@@ -1607,6 +1607,7 @@ bool Context::create_device(VkPhysicalDevice gpu_, VkSurfaceKHR surface,
|
||||
if (ext.device_api_core_version < VK_API_VERSION_1_2)
|
||||
{
|
||||
ext.driver_id = driver_properties.driverID;
|
||||
ext.supports_driver_properties = has_extension(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME);
|
||||
ext.vk12_props.driverID = ext.driver_id;
|
||||
memcpy(ext.vk11_props.deviceUUID, id_properties.deviceUUID, sizeof(id_properties.deviceUUID));
|
||||
memcpy(ext.vk11_props.driverUUID, id_properties.driverUUID, sizeof(id_properties.driverUUID));
|
||||
@@ -1619,7 +1620,10 @@ bool Context::create_device(VkPhysicalDevice gpu_, VkSurfaceKHR surface,
|
||||
ext.vk11_props.subgroupSize = subgroup_properties.subgroupSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
ext.driver_id = ext.vk12_props.driverID;
|
||||
ext.supports_driver_properties = true;
|
||||
}
|
||||
|
||||
if (ext.device_api_core_version < VK_API_VERSION_1_3)
|
||||
{
|
||||
|
||||
@@ -912,6 +912,12 @@ void Device::init_workarounds()
|
||||
LOGI("Detected non-profiling tracing tool, forcing host cached memory types for performance.\n");
|
||||
workarounds.force_host_cached = true;
|
||||
}
|
||||
|
||||
if (!debug_marker_sensitive && (t.purposes & VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT) != 0)
|
||||
{
|
||||
LOGI("Detected tool which cares about debug markers.\n");
|
||||
debug_marker_sensitive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4330,6 +4336,7 @@ BufferHandle Device::create_imported_host_buffer(const BufferCreateInfo &create_
|
||||
VkImportMemoryHostPointerInfoEXT import = { VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT };
|
||||
import.handleType = type;
|
||||
import.pHostPointer = host_buffer;
|
||||
import.pNext = alloc_info.pNext;
|
||||
alloc_info.pNext = &import;
|
||||
|
||||
VkDeviceMemory memory;
|
||||
|
||||
@@ -479,6 +479,11 @@ public:
|
||||
return ext;
|
||||
}
|
||||
|
||||
bool consumes_debug_markers() const
|
||||
{
|
||||
return debug_marker_sensitive;
|
||||
}
|
||||
|
||||
bool swapchain_touched() const;
|
||||
|
||||
double convert_device_timestamp_delta(uint64_t start_ticks, uint64_t end_ticks) const;
|
||||
@@ -544,6 +549,7 @@ private:
|
||||
VkPhysicalDeviceProperties gpu_props;
|
||||
|
||||
DeviceFeatures ext;
|
||||
bool debug_marker_sensitive = false;
|
||||
void init_stock_samplers();
|
||||
void init_stock_sampler(StockSampler sampler, float max_aniso, float lod_bias);
|
||||
void init_timeline_semaphores();
|
||||
|
||||
Reference in New Issue
Block a user