From 0b7c30fa350d2c8d9d60a535d31b572e848a6eb5 Mon Sep 17 00:00:00 2001 From: Moritz Leitner Date: Tue, 10 Mar 2026 14:08:41 +0100 Subject: [PATCH] Use ClearUnorderedAccessViewFloat() instead of ClearUnorderedAccessViewUint() in command_clear_color_texture() --- drivers/d3d12/rendering_device_driver_d3d12.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/d3d12/rendering_device_driver_d3d12.cpp b/drivers/d3d12/rendering_device_driver_d3d12.cpp index 56f42c60cecb..4106062050d6 100644 --- a/drivers/d3d12/rendering_device_driver_d3d12.cpp +++ b/drivers/d3d12/rendering_device_driver_d3d12.cpp @@ -4039,18 +4039,11 @@ void RenderingDeviceDriverD3D12::command_clear_color_texture(CommandBufferID p_c cmd_buf_info->uav_alloc.cpu_handle, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); - UINT values[4] = { - (UINT)p_color.get_r8(), - (UINT)p_color.get_g8(), - (UINT)p_color.get_b8(), - (UINT)p_color.get_a8(), - }; - - cmd_buf_info->cmd_list->ClearUnorderedAccessViewUint( + cmd_buf_info->cmd_list->ClearUnorderedAccessViewFloat( shader_visible_descriptor_allocation.gpu_handle, cmd_buf_info->uav_alloc.cpu_handle, tex_info->resource, - values, + p_color.components, 0, nullptr); }