}
anv_fill_buffer_surface_state(device, state,
- anv_format_for_vk_format(format),
+ anv_format_for_vk_format(format)->surface_format,
offset, range, 1);
}
void
anv_fill_buffer_surface_state(struct anv_device *device, void *state,
- const struct anv_format *format,
+ enum isl_format format,
uint32_t offset, uint32_t range, uint32_t stride)
{
switch (device->info.gen) {
const struct anv_format *format =
anv_format_for_vk_format(pCreateInfo->format);
- anv_fill_buffer_surface_state(device, view->surface_state.map, format,
+ anv_fill_buffer_surface_state(device, view->surface_state.map,
+ format->surface_format,
view->offset, pCreateInfo->range,
format->isl_layout->bpb / 8);
};
void anv_fill_buffer_surface_state(struct anv_device *device, void *state,
- const struct anv_format *format,
+ enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride);
-void gen7_fill_buffer_surface_state(void *state, const struct anv_format *format,
+void gen7_fill_buffer_surface_state(void *state, enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride);
-void gen75_fill_buffer_surface_state(void *state, const struct anv_format *format,
+void gen75_fill_buffer_surface_state(void *state, enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride);
-void gen8_fill_buffer_surface_state(void *state, const struct anv_format *format,
+void gen8_fill_buffer_surface_state(void *state, enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride);
-void gen9_fill_buffer_surface_state(void *state, const struct anv_format *format,
+void gen9_fill_buffer_surface_state(void *state, enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride);
}
GENX_FUNC(GEN7, GEN75) void
-genX(fill_buffer_surface_state)(void *state, const struct anv_format *format,
+genX(fill_buffer_surface_state)(void *state, enum isl_format format,
uint32_t offset, uint32_t range,
uint32_t stride)
{
struct GENX(RENDER_SURFACE_STATE) surface_state = {
.SurfaceType = SURFTYPE_BUFFER,
- .SurfaceFormat = format->surface_format,
+ .SurfaceFormat = format,
.SurfaceVerticalAlignment = VALIGN_4,
.SurfaceHorizontalAlignment = HALIGN_4,
.TiledSurface = false,
}
void
-genX(fill_buffer_surface_state)(void *state, const struct anv_format *format,
+genX(fill_buffer_surface_state)(void *state, enum isl_format format,
uint32_t offset, uint32_t range, uint32_t stride)
{
uint32_t num_elements = range / stride;
struct GENX(RENDER_SURFACE_STATE) surface_state = {
.SurfaceType = SURFTYPE_BUFFER,
.SurfaceArray = false,
- .SurfaceFormat = format->surface_format,
+ .SurfaceFormat = format,
.SurfaceVerticalAlignment = VALIGN4,
.SurfaceHorizontalAlignment = HALIGN4,
.TileMode = LINEAR,