summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-13 13:39:20 -0700
committerJason Ekstrand <[email protected]>2016-05-17 12:17:22 -0700
commit97ba402cc3d5db37778d2bec284df32316cae6d1 (patch)
tree069bae5b3f6cbb5a8acce424208e010bdd65af76 /src/intel
parent234ecf26c65a8909e91313a8b35e2a8a8bbfc0ef (diff)
anv/image: Use get_isl_format when creating buffer views
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_image.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 6316a2aadc5..f48d3161912 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -646,10 +646,11 @@ void anv_buffer_view_init(struct anv_buffer_view *view,
{
ANV_FROM_HANDLE(anv_buffer, buffer, pCreateInfo->buffer);
- const struct anv_format *format =
- anv_format_for_vk_format(pCreateInfo->format);
+ /* TODO: Handle the format swizzle? */
- view->format = format->isl_format;
+ view->format = anv_get_isl_format(pCreateInfo->format,
+ VK_IMAGE_ASPECT_COLOR_BIT,
+ VK_IMAGE_TILING_LINEAR, NULL);
view->bo = buffer->bo;
view->offset = buffer->offset + pCreateInfo->offset;
view->range = pCreateInfo->range == VK_WHOLE_SIZE ?
@@ -661,7 +662,7 @@ void anv_buffer_view_init(struct anv_buffer_view *view,
anv_fill_buffer_surface_state(device, view->surface_state,
view->format,
view->offset, view->range,
- format->isl_layout->bs);
+ isl_format_get_layout(view->format)->bs);
} else {
view->surface_state = (struct anv_state){ 0 };
}
@@ -679,7 +680,7 @@ void anv_buffer_view_init(struct anv_buffer_view *view,
storage_format,
view->offset, view->range,
(storage_format == ISL_FORMAT_RAW ? 1 :
- format->isl_layout->bs));
+ isl_format_get_layout(storage_format)->bs));
isl_buffer_fill_image_param(&device->isl_dev,
&view->storage_image_param,