[PATCH vkd3d 03/12] vkd3d: Do not call vkCmdPushConstants() with a count of zero (KHRONOS_validation).

Henri Verbeet hverbeet at gmail.com
Wed Apr 20 10:40:52 CDT 2022


On Mon, 18 Apr 2022 at 08:34, Giovanni Mascellani
<gmascellani at codeweavers.com> wrote:
> @@ -4657,8 +4657,9 @@ static void d3d12_command_list_set_root_constants(struct d3d12_command_list *lis
>      const struct d3d12_root_constant *c;
>
>      c = root_signature_get_32bit_constants(root_signature, index);
> -    VK_CALL(vkCmdPushConstants(list->vk_command_buffer, root_signature->vk_pipeline_layout,
> -            c->stage_flags, c->offset + offset * sizeof(uint32_t), count * sizeof(uint32_t), data));
> +    if (count)
> +        VK_CALL(vkCmdPushConstants(list->vk_command_buffer, root_signature->vk_pipeline_layout,
> +                c->stage_flags, c->offset + offset * sizeof(uint32_t), count * sizeof(uint32_t), data));
>  }

Is calling SetGraphicsRoot32BitConstants()/SetComputeRoot32BitConstants()
valid d3d12? If not, we should be fixing the callers instead.



More information about the wine-devel mailing list