Skip to content

Don't use CreateCommandList1 on D3D12.#119971

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
DarioSamo:d3d12-command-list-creation-fix
Jun 2, 2026
Merged

Don't use CreateCommandList1 on D3D12.#119971
Repiteo merged 1 commit into
godotengine:masterfrom
DarioSamo:d3d12-command-list-creation-fix

Conversation

@DarioSamo
Copy link
Copy Markdown
Contributor

@DarioSamo DarioSamo commented Jun 2, 2026

The current implementation of the usage of CreateCommandList1 on the D3D12 driver introduces a failure point for devices that might report the Device4 API as supported, but fail to create the command list when called. While this is not expected behavior, I've found it to happen on some devices.

Apart from that, it seems the command allocator is created regardless of whether this API is used, which it doesn't require, and probably leads to two command allocators being created per command buffer: one that goes unused and one internally by the driver. Upon further review, it seems this is only necessary because it has to create the command list in an open state. It still requires the command allocator to begin the command list.

I couldn't find much benefit or difference to using the newer API here instead of the safer option.

Copy link
Copy Markdown
Member

@blueskythlikesclouds blueskythlikesclouds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clayjohn clayjohn modified the milestones: 4.x, 4.7 Jun 2, 2026
@Repiteo Repiteo merged commit fc35856 into godotengine:master Jun 2, 2026
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented Jun 2, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants