diff --git a/drivers/d3d12/rendering_device_driver_d3d12.cpp b/drivers/d3d12/rendering_device_driver_d3d12.cpp index 917104d0df2..00fc3876a97 100644 --- a/drivers/d3d12/rendering_device_driver_d3d12.cpp +++ b/drivers/d3d12/rendering_device_driver_d3d12.cpp @@ -3830,7 +3830,7 @@ static void _add_descriptor_count_for_uniform(RenderingDevice::UniformType p_typ } RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView p_uniforms, ShaderID p_shader, uint32_t p_set_index, int p_linear_pool_index) { - // p_linear_pool_index = -1; // TODO:? Linear pools not implemented or not supported by API backend. + //p_linear_pool_index = -1; // TODO:? Linear pools not implemented or not supported by API backend. // Pre-bookkeep. UniformSetInfo *uniform_set_info = VersatileResource::allocate(resources_allocator); diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm index 302e4dc5526..dea02f69977 100644 --- a/drivers/metal/rendering_device_driver_metal.mm +++ b/drivers/metal/rendering_device_driver_metal.mm @@ -2570,7 +2570,7 @@ void RenderingDeviceDriverMetal::shader_destroy_modules(ShaderID p_shader) { /*********************/ RDD::UniformSetID RenderingDeviceDriverMetal::uniform_set_create(VectorView p_uniforms, ShaderID p_shader, uint32_t p_set_index, int p_linear_pool_index) { - // p_linear_pool_index = -1; // TODO:? Linear pools not implemented or not supported by API backend. + //p_linear_pool_index = -1; // TODO:? Linear pools not implemented or not supported by API backend. MDUniformSet *set = new MDUniformSet(); Vector bound_uniforms; diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp index ae6cddc987f..3189ab0bd19 100644 --- a/drivers/vulkan/rendering_device_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp @@ -1384,9 +1384,9 @@ Error RenderingDeviceDriverVulkan::initialize(uint32_t p_device_index, uint32_t vkGetPhysicalDeviceProperties(physical_device, &physical_device_properties); // Workaround a driver bug on Adreno 730 GPUs that keeps leaking memory on each call to vkResetDescriptorPool. - // Which eventually run out of memory. in such case we should not be using linear allocated pools - // Bug introduced in driver 512.597.0 and fixed in 512.671.0 - // Confirmed by Qualcomm + // Which eventually run out of memory. In such case we should not be using linear allocated pools + // Bug introduced in driver 512.597.0 and fixed in 512.671.0. + // Confirmed by Qualcomm. if (linear_descriptor_pools_enabled) { const uint32_t reset_descriptor_pool_broken_driver_begin = VK_MAKE_VERSION(512u, 597u, 0u); const uint32_t reset_descriptor_pool_fixed_driver_begin = VK_MAKE_VERSION(512u, 671u, 0u); @@ -1749,7 +1749,7 @@ RDD::TextureID RenderingDeviceDriverVulkan::texture_create(const TextureFormat & // VUID-VkImageCreateInfo-usage-00963 : // If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, // then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, - // and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set + // and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set. create_info.usage &= (VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT); } else { alloc_create_info.preferredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; @@ -5925,7 +5925,7 @@ RenderingDeviceDriverVulkan::~RenderingDeviceDriverVulkan() { } vmaDestroyAllocator(allocator); - // Destroy linearly allocated descriptor pools + // Destroy linearly allocated descriptor pools. for (KeyValue &pool_map : linear_descriptor_set_pools) { for (KeyValue> pools : pool_map.value) { for (KeyValue descriptor_pool : pools.value) { diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 2fbafcbda37..b8b60e2e63d 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -3829,7 +3829,7 @@ Error RenderingDevice::screen_create(DisplayServer::WindowID p_screen) { Error RenderingDevice::screen_prepare_for_drawing(DisplayServer::WindowID p_screen) { _THREAD_SAFE_METHOD_ - // After submitting work, acquire the swapchain image(s) + // After submitting work, acquire the swapchain image(s). HashMap::ConstIterator it = screen_swap_chains.find(p_screen); ERR_FAIL_COND_V_MSG(it == screen_swap_chains.end(), ERR_CANT_CREATE, "A swap chain was not created for the screen."); @@ -4432,18 +4432,18 @@ void RenderingDevice::draw_list_draw(DrawListID p_list, bool p_use_indices, uint } if (!dl->state.sets[i].bound) { - // Batch contiguous descriptor sets in a single call + // Batch contiguous descriptor sets in a single call. if (descriptor_set_batching) { // All good, see if this requires re-binding. if (i - last_set_index > 1) { - // If the descriptor sets are not contiguous, bind the previous ones and start a new batch + // If the descriptor sets are not contiguous, bind the previous ones and start a new batch. draw_graph.add_draw_list_bind_uniform_sets(dl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); first_set_index = i; valid_set_count = 1; valid_descriptor_ids[0] = dl->state.sets[i].uniform_set_driver_id; } else { - // Otherwise, keep storing in the current batch + // Otherwise, keep storing in the current batch. valid_descriptor_ids[valid_set_count] = dl->state.sets[i].uniform_set_driver_id; valid_set_count++; } @@ -4460,7 +4460,7 @@ void RenderingDevice::draw_list_draw(DrawListID p_list, bool p_use_indices, uint } } - // Bind the remaining batch + // Bind the remaining batch. if (descriptor_set_batching && valid_set_count > 0) { draw_graph.add_draw_list_bind_uniform_sets(dl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); } @@ -5005,14 +5005,14 @@ void RenderingDevice::compute_list_dispatch(ComputeListID p_list, uint32_t p_x_g if (descriptor_set_batching) { // All good, see if this requires re-binding. if (i - last_set_index > 1) { - // If the descriptor sets are not contiguous, bind the previous ones and start a new batch + // If the descriptor sets are not contiguous, bind the previous ones and start a new batch. draw_graph.add_compute_list_bind_uniform_sets(cl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); first_set_index = i; valid_set_count = 1; valid_descriptor_ids[0] = cl->state.sets[i].uniform_set_driver_id; } else { - // Otherwise, keep storing in the current batch + // Otherwise, keep storing in the current batch. valid_descriptor_ids[valid_set_count] = cl->state.sets[i].uniform_set_driver_id; valid_set_count++; } @@ -5029,7 +5029,7 @@ void RenderingDevice::compute_list_dispatch(ComputeListID p_list, uint32_t p_x_g } } - // Bind the remaining batch + // Bind the remaining batch. if (valid_set_count > 0) { draw_graph.add_compute_list_bind_uniform_sets(cl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); } @@ -5150,14 +5150,14 @@ void RenderingDevice::compute_list_dispatch_indirect(ComputeListID p_list, RID p if (!cl->state.sets[i].bound) { // All good, see if this requires re-binding. if (i - last_set_index > 1) { - // If the descriptor sets are not contiguous, bind the previous ones and start a new batch + // If the descriptor sets are not contiguous, bind the previous ones and start a new batch. draw_graph.add_compute_list_bind_uniform_sets(cl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); first_set_index = i; valid_set_count = 1; valid_descriptor_ids[0] = cl->state.sets[i].uniform_set_driver_id; } else { - // Otherwise, keep storing in the current batch + // Otherwise, keep storing in the current batch. valid_descriptor_ids[valid_set_count] = cl->state.sets[i].uniform_set_driver_id; valid_set_count++; } @@ -5172,7 +5172,7 @@ void RenderingDevice::compute_list_dispatch_indirect(ComputeListID p_list, RID p } } - // Bind the remaining batch + // Bind the remaining batch. if (valid_set_count > 0) { draw_graph.add_compute_list_bind_uniform_sets(cl->state.pipeline_shader_driver_id, valid_descriptor_ids, first_set_index, valid_set_count); } diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h index 92045bd0d84..716fdfaa051 100644 --- a/servers/rendering/rendering_device.h +++ b/servers/rendering/rendering_device.h @@ -191,7 +191,7 @@ private: Error _buffer_initialize(Buffer *p_buffer, const uint8_t *p_data, size_t p_data_size, uint32_t p_required_align = 32); void update_perf_report(); - // flag for batching descriptor sets + // Flag for batching descriptor sets. bool descriptor_set_batching = true; // When true, the final draw call that copies our offscreen result into the Swapchain is put into its // own cmd buffer, so that the whole rendering can start early instead of having to wait for the