summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-15 13:45:53 -0700
committerJason Ekstrand <[email protected]>2015-10-15 13:45:53 -0700
commitbed7d1e03cfb03148e65566d299430063e90a47a (patch)
treea38a362f4c269c7f9add85530bed6e154a90ea02 /src/vulkan/anv_cmd_buffer.c
parent6dc4cad994ca03b71f99b79856d8d8ff5cf3ed83 (diff)
anv: Add support for BufferInfo in descriptor sets
Diffstat (limited to 'src/vulkan/anv_cmd_buffer.c')
-rw-r--r--src/vulkan/anv_cmd_buffer.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c
index df076d0cac6..2801f730478 100644
--- a/src/vulkan/anv_cmd_buffer.c
+++ b/src/vulkan/anv_cmd_buffer.c
@@ -614,11 +614,25 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
bo = desc->buffer_view->bo;
bo_offset = desc->buffer_view->offset;
break;
+ case ANV_DESCRIPTOR_TYPE_BUFFER_AND_OFFSET: {
+ struct anv_state state =
+ anv_cmd_buffer_alloc_surface_state(cmd_buffer);
+ anv_fill_buffer_surface_state(cmd_buffer->device, state.map,
+ anv_format_for_vk_format(VK_FORMAT_R32G32B32A32_SFLOAT),
+ desc->offset, desc->range);
+ surface_state = &state;
+ bo = desc->buffer_view->bo;
+ bo_offset = desc->buffer_view->offset;
+ break;
+ }
case ANV_DESCRIPTOR_TYPE_IMAGE_VIEW:
surface_state = &desc->image_view->nonrt_surface_state;
bo = desc->image_view->bo;
bo_offset = desc->image_view->offset;
break;
+ case ANV_DESCRIPTOR_TYPE_IMAGE_VIEW_AND_SAMPLER:
+ /* Nothing for us to do here */
+ break;
}
bt_map[bias + s] = surface_state->offset + state_offset;
@@ -657,7 +671,8 @@ anv_cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.descriptors[binding->set];
struct anv_descriptor *desc = &set->descriptors[binding->offset];
- if (desc->type != ANV_DESCRIPTOR_TYPE_SAMPLER)
+ if (desc->type != ANV_DESCRIPTOR_TYPE_SAMPLER &&
+ desc->type != ANV_DESCRIPTOR_TYPE_IMAGE_VIEW_AND_SAMPLER)
continue;
struct anv_sampler *sampler = desc->sampler;