Because that's what it is, an isl format.
const struct anv_format *format =
anv_format_for_descriptor_type(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER);
anv_fill_buffer_surface_state(cmd_buffer->device, surface_state,
- format->surface_format, bo_offset, 12, 1);
+ format->isl_format, bo_offset, 12, 1);
bt_map[0] = surface_state.offset + state_offset;
add_surface_state_reloc(cmd_buffer, surface_state, bo, bo_offset);
const struct anv_format *format =
anv_format_for_descriptor_type(write->descriptorType);
- view->format = format->surface_format;
+ view->format = format->isl_format;
view->bo = buffer->bo;
view->offset = buffer->offset + write->pBufferInfo[j].offset;
[__vk_fmt] = { \
.vk_format = __vk_fmt, \
.name = #__vk_fmt, \
- .surface_format = __hw_fmt, \
+ .isl_format = __hw_fmt, \
.isl_layout = &isl_format_layouts[__hw_fmt], \
.swizzle = __swizzle, \
__VA_ARGS__ \
switch (aspect) {
case VK_IMAGE_ASPECT_COLOR_BIT:
- if (anv_fmt->surface_format == ISL_FORMAT_UNSUPPORTED) {
+ if (anv_fmt->isl_format == ISL_FORMAT_UNSUPPORTED) {
return ISL_FORMAT_UNSUPPORTED;
} else if (tiling == VK_IMAGE_TILING_OPTIMAL &&
!util_is_power_of_two(anv_fmt->isl_layout->bs)) {
* this by switching them over to RGBX or RGBA formats under the
* hood.
*/
- enum isl_format rgbx = isl_format_rgb_to_rgbx(anv_fmt->surface_format);
+ enum isl_format rgbx = isl_format_rgb_to_rgbx(anv_fmt->isl_format);
if (rgbx != ISL_FORMAT_UNSUPPORTED)
return rgbx;
else
- return isl_format_rgb_to_rgba(anv_fmt->surface_format);
+ return isl_format_rgb_to_rgba(anv_fmt->isl_format);
} else {
- return anv_fmt->surface_format;
+ return anv_fmt->isl_format;
}
case VK_IMAGE_ASPECT_DEPTH_BIT:
case (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT):
assert(anv_fmt->depth_format != 0);
- return anv_fmt->surface_format;
+ return anv_fmt->isl_format;
case VK_IMAGE_ASPECT_STENCIL_BIT:
assert(anv_fmt->has_stencil);
iview->base_mip = range->baseMipLevel;
if (!isl_format_is_compressed(iview->format) &&
- isl_format_is_compressed(image->format->surface_format)) {
+ isl_format_is_compressed(image->format->isl_format)) {
/* Scale the ImageView extent by the backing Image. This is used
* internally when an uncompressed ImageView is created on a
* compressed Image. The ImageView can therefore be used for copying
const struct anv_format *format =
anv_format_for_vk_format(pCreateInfo->format);
- view->format = format->surface_format;
+ view->format = format->isl_format;
view->bo = buffer->bo;
view->offset = buffer->offset + pCreateInfo->offset;
view->range = pCreateInfo->range == VK_WHOLE_SIZE ?
uint32_t img_x = 0;
uint32_t img_y = 0;
uint32_t img_o = 0;
- if (isl_format_is_compressed(dest_image->format->surface_format))
+ if (isl_format_is_compressed(dest_image->format->isl_format))
isl_surf_get_image_intratile_offset_el(&cmd_buffer->device->isl_dev,
&dest_image->color_surface.isl,
pRegions[r].imageSubresource.mipLevel,
struct anv_format {
const VkFormat vk_format;
const char *name;
- enum isl_format surface_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */
+ enum isl_format isl_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */
const struct isl_format_layout *isl_layout;
uint16_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */
struct anv_format_swizzle swizzle;
return;
/* Don't add formats which aren't supported by the driver */
- if (anv_format_for_vk_format(format)->surface_format ==
+ if (anv_format_for_vk_format(format)->isl_format ==
ISL_FORMAT_UNSUPPORTED) {
return;
}