anv: Pass an isl_format into fill_buffer_surface_state

This commit is contained in:
Jason Ekstrand 2015-12-14 16:14:20 -08:00
parent c4219bc6ff
commit 1f98bf8da0
6 changed files with 13 additions and 12 deletions

View File

@ -605,7 +605,7 @@ fill_descriptor_buffer_surface_state(struct anv_device *device, void *state,
}
anv_fill_buffer_surface_state(device, state,
anv_format_for_vk_format(format),
anv_format_for_vk_format(format)->surface_format,
offset, range, 1);
}

View File

@ -1493,7 +1493,7 @@ void anv_DestroyBuffer(
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) {

View File

@ -521,7 +521,8 @@ anv_CreateBufferView(VkDevice _device,
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);

View File

@ -1524,20 +1524,20 @@ struct anv_buffer_view {
};
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);

View File

@ -57,7 +57,7 @@ anv_surftype(const struct anv_image *image, VkImageViewType view_type)
}
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)
{
@ -65,7 +65,7 @@ genX(fill_buffer_surface_state)(void *state, const struct anv_format *format,
struct GENX(RENDER_SURFACE_STATE) surface_state = {
.SurfaceType = SURFTYPE_BUFFER,
.SurfaceFormat = format->surface_format,
.SurfaceFormat = format,
.SurfaceVerticalAlignment = VALIGN_4,
.SurfaceHorizontalAlignment = HALIGN_4,
.TiledSurface = false,

View File

@ -57,7 +57,7 @@ anv_surftype(const struct anv_image *image, VkImageViewType view_type)
}
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;
@ -65,7 +65,7 @@ genX(fill_buffer_surface_state)(void *state, const struct anv_format *format,
struct GENX(RENDER_SURFACE_STATE) surface_state = {
.SurfaceType = SURFTYPE_BUFFER,
.SurfaceArray = false,
.SurfaceFormat = format->surface_format,
.SurfaceFormat = format,
.SurfaceVerticalAlignment = VALIGN4,
.SurfaceHorizontalAlignment = HALIGN4,
.TileMode = LINEAR,