Bug 104677

Summary: radv_generate_graphics_pipeline_key reads input rate from incorrect binding
Product: Mesa Reporter: Philip Rebohle <philip.rebohle>
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 17.3   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Modification to the 'instancing' demo
Proposed fix

Description Philip Rebohle 2018-01-17 19:56:28 UTC
Created attachment 136813 [details] [review]
Modification to the 'instancing' demo

The following code leads to incorrect vertex buffer reads if pVertexBindingDescriptions[n].binding != n for any given n:

    binding = input_state->pVertexAttributeDescriptions[i].binding;
    if (input_state->pVertexBindingDescriptions[binding].inputRate)

Instead, this function should scan the binding descriptions for a binding that has the same binding number as the vertex attribute.

This can be reproduced by reordering the vertex binding definition in the 'instancing' demo from Sascha Willems' Vulkan samples, see attachments.
Comment 1 Philip Rebohle 2018-01-17 19:59:15 UTC
Created attachment 136814 [details] [review]
Proposed fix

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.