Skip to content

Commit

Permalink
vkd3d: Fail creation of command signature if DGC is not supported.
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Jul 12, 2022
1 parent 73700f4 commit 5b73139
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions libs/vkd3d/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -9663,12 +9663,6 @@ static void d3d12_command_list_execute_indirect_state_template(
unsigned int i;
HRESULT hr;

if (!list->device->device_info.device_generated_commands_features_nv.deviceGeneratedCommands)
{
WARN("Ignoring unsupported state template execute indirect.\n");
return;
}

/* To build device generated commands, we need to know the pipeline we're going to render with. */
if (!d3d12_command_list_update_graphics_pipeline(list))
return;
Expand Down Expand Up @@ -13368,20 +13362,19 @@ HRESULT d3d12_command_signature_create(struct d3d12_device *device, struct d3d12
desc->NumArgumentDescs * sizeof(*desc->pArgumentDescs));

if (FAILED(hr = vkd3d_private_store_init(&object->private_store)))
{
vkd3d_free((void *)object->desc.pArgumentDescs);
vkd3d_free(object);
return hr;
}
goto err;

if ((object->requires_state_template = requires_state_template))
{
if (FAILED(hr = d3d12_command_signature_init_state_template(object, desc, root_signature, device)))
if (!device->device_info.device_generated_commands_features_nv.deviceGeneratedCommands)
{
vkd3d_free((void *)object->desc.pArgumentDescs);
vkd3d_free(object);
return hr;
FIXME("VK_NV_device_generated_commands is not supported by implementation.\n");
hr = E_NOTIMPL;
goto err;
}

if (FAILED(hr = d3d12_command_signature_init_state_template(object, desc, root_signature, device)))
goto err;
}
else
object->argument_buffer_offset = argument_buffer_offset;
Expand All @@ -13393,4 +13386,9 @@ HRESULT d3d12_command_signature_create(struct d3d12_device *device, struct d3d12
*signature = object;

return S_OK;

err:
vkd3d_free((void *)object->desc.pArgumentDescs);
vkd3d_free(object);
return hr;
}

0 comments on commit 5b73139

Please sign in to comment.