[Mesa-dev] [PATCH] radv: Use correct bindings for inputRate in key generation.
Dave Airlie
airlied at gmail.com
Thu Jan 18 19:45:49 UTC 2018
On 19 January 2018 at 00:55, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> The bindings also have an index field.
Make sense,
Reviewed-by: Dave Airlie <airlied at redhat.com>
>
> Fixes: 49d035122e "radv: Add single pipeline cache key."
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104677
> ---
> src/amd/vulkan/radv_pipeline.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index c3c17af850..5f824796fe 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -1726,10 +1726,16 @@ radv_generate_graphics_pipeline_key(struct radv_pipeline *pipeline,
>
> key.has_multiview_view_index = has_view_index;
>
> + uint32_t binding_input_rate = 0;
> + for (unsigned i = 0; i < input_state->vertexBindingDescriptionCount; ++i) {
> + if (input_state->pVertexBindingDescriptions[i].inputRate)
> + binding_input_rate |= 1u << input_state->pVertexBindingDescriptions[i].binding;
> + }
> +
> for (unsigned i = 0; i < input_state->vertexAttributeDescriptionCount; ++i) {
> unsigned binding;
> binding = input_state->pVertexAttributeDescriptions[i].binding;
> - if (input_state->pVertexBindingDescriptions[binding].inputRate)
> + if (binding_input_rate & (1u << binding))
> key.instance_rate_inputs |= 1u << input_state->pVertexAttributeDescriptions[i].location;
> }
>
> --
> 2.15.1
>
> _______________________________________________
> 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