d->dynamic_offsets[surface_slots[b].dynamic_slot];
offset = view->offset + dynamic_offset;
- gen8_fill_buffer_surface_state(state.map, view->format, offset,
- view->range - dynamic_offset);
+ anv_fill_buffer_surface_state(cmd_buffer->device,
+ state.map, view->format, offset,
+ view->range - dynamic_offset);
} else {
offset = view->offset;
memcpy(state.map, view->surface_state.map, 64);
return VK_SUCCESS;
}
+void
+anv_fill_buffer_surface_state(struct anv_device *device, void *state,
+ const struct anv_format *format,
+ uint32_t offset, uint32_t range)
+{
+ switch (device->info.gen) {
+ case 8:
+ gen8_fill_buffer_surface_state(state, format, offset, range);
+ break;
+ default:
+ unreachable("unsupported gen\n");
+ }
+}
+
VkResult
anv_buffer_view_create(
struct anv_device * device,
const VkBufferViewCreateInfo *pCreateInfo,
struct anv_buffer_view **view_out);
+void anv_fill_buffer_surface_state(struct anv_device *device, void *state,
+ const struct anv_format *format,
+ uint32_t offset, uint32_t range);
+
void gen8_fill_buffer_surface_state(void *state, const struct anv_format *format,
uint32_t offset, uint32_t range);