anv: Use isl_format_layout::bs instead of ::bpb

For all formats used by Vulkan, 8 * bs == bpb.
(bs=block_size_in_bytes, bpb=bits_per_block)
This commit is contained in:
Chad Versace
2016-01-05 09:59:07 -08:00
parent a1d64ae561
commit 89b68dc8d0
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ anv_get_isl_format(VkFormat format, VkImageAspectFlags aspect,
if (anv_fmt->surface_format == ISL_FORMAT_UNSUPPORTED) {
return ISL_FORMAT_UNSUPPORTED;
} else if (tiling == VK_IMAGE_TILING_OPTIMAL &&
!util_is_power_of_two(anv_fmt->isl_layout->bpb)) {
!util_is_power_of_two(anv_fmt->isl_layout->bs)) {
/* Tiled formats *must* be power-of-two because we need up upload
* them with the render pipeline. For 3-channel formats, we fix
* this by switching them over to RGBX or RGBA formats under the
+3 -3
View File
@@ -545,7 +545,7 @@ anv_CreateBufferView(VkDevice _device,
anv_fill_buffer_surface_state(device, view->surface_state.map,
view->format,
view->offset, pCreateInfo->range,
format->isl_layout->bpb / 8);
format->isl_layout->bs);
} else {
view->surface_state = (struct anv_state){ 0 };
}
@@ -560,7 +560,7 @@ anv_CreateBufferView(VkDevice _device,
anv_fill_buffer_surface_state(device, view->storage_surface_state.map,
storage_format,
view->offset, pCreateInfo->range,
format->isl_layout->bpb / 8);
format->isl_layout->bs);
} else {
view->storage_surface_state = (struct anv_state){ 0 };
}
@@ -658,6 +658,6 @@ anv_buffer_view_fill_image_param(struct anv_device *device,
param->swizzling[0] = 0xff;
param->swizzling[1] = 0xff;
param->stride[0] = isl_format_layouts[view->format].bpb / 8;
param->stride[0] = isl_format_layouts[view->format].bs;
param->size[0] = view->range / param->stride[0];
}