anv: Use an anv_address in anv_buffer_view
Instead of storing a BO and offset separately, use an anv_address. This changes anv_fill_buffer_surface_state to use anv_address and we now call anv_address_physical and pass that into ISL. Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
@@ -745,9 +745,11 @@ anv_descriptor_set_write_buffer(struct anv_descriptor_set *set,
|
||||
&set->buffer_views[bind_layout->buffer_index + element];
|
||||
|
||||
bview->format = anv_isl_format_for_descriptor_type(type);
|
||||
bview->bo = buffer->bo;
|
||||
bview->offset = buffer->offset + offset;
|
||||
bview->range = anv_buffer_get_range(buffer, offset, range);
|
||||
bview->address = (struct anv_address) {
|
||||
.bo = buffer->bo,
|
||||
.offset = buffer->offset + offset,
|
||||
};
|
||||
|
||||
/* If we're writing descriptors through a push command, we need to
|
||||
* allocate the surface state from the command buffer. Otherwise it will
|
||||
@@ -758,7 +760,7 @@ anv_descriptor_set_write_buffer(struct anv_descriptor_set *set,
|
||||
|
||||
anv_fill_buffer_surface_state(device, bview->surface_state,
|
||||
bview->format,
|
||||
bview->offset, bview->range, 1);
|
||||
bview->address, bview->range, 1);
|
||||
|
||||
*desc = (struct anv_descriptor) {
|
||||
.type = type,
|
||||
|
Reference in New Issue
Block a user