diff options
author | Jason Ekstrand <[email protected]> | 2015-10-15 15:17:27 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-15 15:17:27 -0700 |
commit | 03952b1513b7621bb0bb151d0947e8bada64ca04 (patch) | |
tree | e74fbea98afc3670d0acf81162099d4a6cffe6c2 /src/vulkan/anv_cmd_buffer.c | |
parent | b459b3d82cd4a77f1004907ad9b2487111390a84 (diff) |
anv/device: Add support for combined image and sampler descriptors
Diffstat (limited to 'src/vulkan/anv_cmd_buffer.c')
-rw-r--r-- | src/vulkan/anv_cmd_buffer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 2801f730478..19ad31167bf 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -608,6 +608,7 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer, switch (desc->type) { case ANV_DESCRIPTOR_TYPE_EMPTY: case ANV_DESCRIPTOR_TYPE_SAMPLER: + /* Nothing for us to do here */ continue; case ANV_DESCRIPTOR_TYPE_BUFFER_VIEW: surface_state = &desc->buffer_view->surface_state; @@ -626,13 +627,11 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer, break; } case ANV_DESCRIPTOR_TYPE_IMAGE_VIEW: + case ANV_DESCRIPTOR_TYPE_IMAGE_VIEW_AND_SAMPLER: 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; @@ -677,6 +676,10 @@ anv_cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer, struct anv_sampler *sampler = desc->sampler; + /* FIXME: We shouldn't have to do this */ + if (sampler == NULL) + continue; + memcpy(state->map + (s * 16), sampler->state, sizeof(sampler->state)); } |