Merge pull request #100322 from darksylinc/matias-tf-comment-fix

Fix grammar / spelling in comments
This commit is contained in:
Thaddeus Crews 2024-12-12 16:13:25 -06:00
commit b7501d219c
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
5 changed files with 19 additions and 19 deletions

View File

@ -3830,7 +3830,7 @@ static void _add_descriptor_count_for_uniform(RenderingDevice::UniformType p_typ
}
RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView<BoundUniform> 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<UniformSetInfo>(resources_allocator);

View File

@ -2570,7 +2570,7 @@ void RenderingDeviceDriverMetal::shader_destroy_modules(ShaderID p_shader) {
/*********************/
RDD::UniformSetID RenderingDeviceDriverMetal::uniform_set_create(VectorView<BoundUniform> 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<BoundUniform> bound_uniforms;

View File

@ -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<int, DescriptorSetPools> &pool_map : linear_descriptor_set_pools) {
for (KeyValue<DescriptorSetPoolKey, HashMap<VkDescriptorPool, uint32_t>> pools : pool_map.value) {
for (KeyValue<VkDescriptorPool, uint32_t> descriptor_pool : pools.value) {

View File

@ -4037,7 +4037,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<DisplayServer::WindowID, RDD::SwapChainID>::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.");
@ -4640,18 +4640,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++;
}
@ -4668,7 +4668,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);
}
@ -5213,14 +5213,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++;
}
@ -5237,7 +5237,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);
}
@ -5358,14 +5358,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++;
}
@ -5380,7 +5380,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);
}

View File

@ -197,7 +197,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