On Mon, 18 Apr 2022 at 08:34, Giovanni Mascellani <gmascellani(a)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.