summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-10 16:27:47 -0800
committerJason Ekstrand <[email protected]>2016-11-16 17:07:35 -0800
commit2e2160969e6e47ae9cd73385f9901d3bf1a92856 (patch)
tree0875f583712eb05372b294eb87052f22366a22db /src/intel
parent37537b7d868ddca376e2553a4ea9e5e0033a961c (diff)
anv/descriptor_set: Put the whole state in the state free list
We're not really saving much by just putting the offset in there. Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 88df5456fd1..97108fad420 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -393,7 +393,7 @@ layout_size(const struct anv_descriptor_set_layout *layout)
struct surface_state_free_list_entry {
void *next;
- uint32_t offset;
+ struct anv_state state;
};
VkResult
@@ -463,10 +463,9 @@ anv_descriptor_set_create(struct anv_device *device,
struct anv_state state;
if (entry) {
- state.map = entry;
- state.offset = entry->offset;
- state.alloc_size = 64;
+ state = entry->state;
pool->surface_state_free_list = entry->next;
+ assert(state.alloc_size == 64);
} else {
state = anv_state_stream_alloc(&pool->surface_state_stream, 64, 64);
}
@@ -489,7 +488,7 @@ anv_descriptor_set_destroy(struct anv_device *device,
struct surface_state_free_list_entry *entry =
set->buffer_views[b].surface_state.map;
entry->next = pool->surface_state_free_list;
- entry->offset = set->buffer_views[b].surface_state.offset;
+ entry->state = set->buffer_views[b].surface_state;
pool->surface_state_free_list = entry;
}