vk/device: Use bias rather than layers for computing binding table size
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 16 May 2015 17:42:51 +0000 (10:42 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 16 May 2015 17:42:53 +0000 (10:42 -0700)
Because we statically use the first 8 binding table entries for render
targets, we need to create a table of size 8 + surfaces.

src/vulkan/device.c

index 8e60398373b6550a48e6899524d83d2c0d75381d..e2871fa43bab7bfc8a1f836ef0eb302455bad2ce 100644 (file)
@@ -2274,7 +2274,7 @@ flush_descriptor_sets(struct anv_cmd_buffer *cmd_buffer)
          struct anv_state state;
          uint32_t size;
 
-         size = (layers + surface_count) * sizeof(uint32_t);
+         size = (bias + surface_count) * sizeof(uint32_t);
          state = anv_state_stream_alloc(&cmd_buffer->surface_state_stream, size, 32);
          memcpy(state.map, bindings->descriptors[s].surfaces, size);