1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #108919 from KeyboardDanni/d3d12_init_shader_model_check

D3D12: Fix shader model check, initialization error handling
This commit is contained in:
Thaddeus Crews
2025-08-01 11:45:19 -05:00
3 changed files with 8 additions and 5 deletions

View File

@@ -6708,7 +6708,6 @@ Error RenderingDevice::initialize(RenderingContextDriver *p_context, DisplayServ
}
frame = 0;
frames.resize(frame_count);
max_timestamp_query_elements = GLOBAL_GET("debug/settings/profiler/max_timestamp_query_elements");
device = context->device_get(device_index);
@@ -6777,6 +6776,8 @@ Error RenderingDevice::initialize(RenderingContextDriver *p_context, DisplayServ
// Use the processor count as the max amount of transfer workers that can be created.
transfer_worker_pool_max_size = OS::get_singleton()->get_processor_count();
frames.resize(frame_count);
// Create data for all the frames.
for (uint32_t i = 0; i < frames.size(); i++) {
frames[i].index = 0;

View File

@@ -1575,7 +1575,9 @@ void RenderingDeviceGraph::initialize(RDD *p_driver, RenderingContextDriver::Dev
}
void RenderingDeviceGraph::finalize() {
_wait_for_secondary_command_buffer_tasks();
if (!frames.is_empty()) {
_wait_for_secondary_command_buffer_tasks();
}
for (Frame &f : frames) {
for (SecondaryCommandBuffer &secondary : f.secondary_command_buffers) {