anv/descriptor_set: Stop marking everything as having dynamic offsets
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Feb 2016 01:13:46 +0000 (17:13 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Feb 2016 01:23:29 +0000 (17:23 -0800)
src/intel/vulkan/anv_descriptor_set.c

index 718bc216f73730285c177cb9e0ee23222aee7248..b439f2a0c36d2498c84799781145840ff86a27df 100644 (file)
@@ -218,8 +218,10 @@ VkResult anv_CreatePipelineLayout(
 
       layout->set[set].dynamic_offset_start = dynamic_offset_count;
       for (uint32_t b = 0; b < set_layout->binding_count; b++) {
-         if (set_layout->binding[b].dynamic_offset_index >= 0)
-            dynamic_offset_count += set_layout->binding[b].array_size;
+         if (set_layout->binding[b].dynamic_offset_index < 0)
+            continue;
+
+         dynamic_offset_count += set_layout->binding[b].array_size;
          for (gl_shader_stage s = 0; s < MESA_SHADER_STAGES; s++) {
             if (set_layout->binding[b].stage[s].surface_index >= 0)
                layout->stage[s].has_dynamic_offsets = true;