Merge pull request #117294 from H3x4g0n/d3d12-texture-clear-fix
Fix `RenderingDevice::texture_clear()` behaving unexpectedly when using the D3D12 driver
This commit is contained in:
commit
0e3249941c
1 changed files with 2 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue