vk: Use compute pipeline layout when binding compute sets
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Fri, 12 Jun 2015 04:57:43 +0000 (21:57 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Fri, 12 Jun 2015 04:57:43 +0000 (21:57 -0700)
src/vulkan/device.c

index b27bd6d765b458b4ac02b457300449d6540e4b6c..0126b248233afc30b7dcafe74f0de50e6690ce82 100644 (file)
@@ -2761,12 +2761,17 @@ void anv_CmdBindDescriptorSets(
     const uint32_t*                             pDynamicOffsets)
 {
    struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *) cmdBuffer;
-   struct anv_pipeline_layout *layout = cmd_buffer->pipeline->layout;
+   struct anv_pipeline_layout *layout;
    struct anv_descriptor_set *set;
    struct anv_descriptor_set_layout *set_layout;
 
    assert(firstSet + setCount < MAX_SETS);
 
+   if (pipelineBindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS)
+      layout = cmd_buffer->pipeline->layout;
+   else
+      layout = cmd_buffer->compute_pipeline->layout;
+
    uint32_t dynamic_slot = 0;
    for (uint32_t i = 0; i < setCount; i++) {
       set = (struct anv_descriptor_set *) pDescriptorSets[i];