diff options
author | Jason Ekstrand <[email protected]> | 2015-11-04 19:51:46 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-04 19:56:18 -0800 |
commit | a40f682c712f8d57b3d8fda5e3c2b0a785811d79 (patch) | |
tree | afb5c295068b13d17208800179c7ecf04874a1d5 /src | |
parent | 1b68120760460c3d23425dadf46df75274b6ddb0 (diff) |
anv/cmd_buffer: Fix SURFACE_STATE for non-view buffer bindings
We were treating it as if it's a BufferView and weren't taking the offset
into account properly.
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/anv_cmd_buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 57cc8a6456b..5ce57f1d98e 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -611,13 +611,14 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer, bo_offset = desc->buffer_view->offset; break; case ANV_DESCRIPTOR_TYPE_BUFFER_AND_OFFSET: { + bo = desc->buffer->bo; + bo_offset = desc->buffer->offset + desc->offset; + surface_state = anv_cmd_buffer_alloc_surface_state(cmd_buffer); anv_fill_buffer_surface_state(cmd_buffer->device, surface_state.map, anv_format_for_vk_format(VK_FORMAT_R32G32B32A32_SFLOAT), - desc->offset, desc->range); - bo = desc->buffer_view->bo; - bo_offset = desc->buffer_view->offset; + bo_offset, desc->range); break; } case ANV_DESCRIPTOR_TYPE_IMAGE_VIEW: |