[Mesa-dev] [PATCH] radv: clear vertex bindings while resetting command buffer

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri May 10 19:44:12 UTC 2019


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Fixes: 5010436e09f "radv: bail out when binding the same vertex buffers"

I'll push after running it through the testsuite.

Thanks!

On Fri, May 10, 2019 at 9:38 PM Józef Kucia <joseph.kucia at gmail.com> wrote:
>
> Only vertex inputs accessed by vertex shader must have valid buffers
> bound.
>
> Signed-off-by: Józef Kucia <joseph.kucia at gmail.com>
> ---
>  src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index b04c998fac2e..890662841d21 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -301,7 +301,6 @@ radv_cmd_buffer_destroy(struct radv_cmd_buffer *cmd_buffer)
>  static VkResult
>  radv_reset_cmd_buffer(struct radv_cmd_buffer *cmd_buffer)
>  {
> -
>         cmd_buffer->device->ws->cs_reset(cmd_buffer->cs);
>
>         list_for_each_entry_safe(struct radv_cmd_buffer_upload, up,
> @@ -326,6 +325,8 @@ radv_reset_cmd_buffer(struct radv_cmd_buffer *cmd_buffer)
>
>         cmd_buffer->record_result = VK_SUCCESS;
>
> +       memset(cmd_buffer->vertex_bindings, 0, sizeof(cmd_buffer->vertex_bindings));
> +
>         for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++) {
>                 cmd_buffer->descriptors[i].dirty = 0;
>                 cmd_buffer->descriptors[i].valid = 0;
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list