if (pRanges[r].aspectMask == 0)
continue;
- assert(pRanges[r].aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(pRanges[r].aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
struct blorp_surf surf;
get_blorp_surf_for_anv_image(image, pRanges[r].aspectMask,
BLORP_BATCH_NO_EMIT_DEPTH_STENCIL);
for (uint32_t a = 0; a < attachmentCount; ++a) {
- if (pAttachments[a].aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ if (pAttachments[a].aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
assert(pAttachments[a].aspectMask == VK_IMAGE_ASPECT_COLOR_BIT);
clear_color_attachment(cmd_buffer, &batch,
&pAttachments[a],
/* The resolved subresource range must have a CCS buffer. */
assert(level < anv_image_aux_levels(image, aspect));
assert(layer_count <= anv_image_aux_layers(image, aspect, level));
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT && image->samples == 1);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV && image->samples == 1);
/* Create a binding table for this surface state. */
uint32_t binding_table;
return plane_format;
}
- assert((aspect & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0);
+ assert((aspect & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
const struct isl_format_layout *isl_layout =
isl_format_get_layout(plane_format.isl_format);
{
assert(image && device);
assert(image->planes[plane].aux_surface.isl.size > 0 &&
- image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
/* The offset to the buffer of clear values must be dword-aligned for GPU
* memcpy operations. It is located immediately after the auxiliary surface.
add_surface(image, &image->planes[plane].aux_surface, plane);
image->planes[plane].aux_usage = ISL_AUX_USAGE_HIZ;
}
- } else if ((aspect & VK_IMAGE_ASPECT_ANY_COLOR_BIT) && vk_info->samples == 1) {
+ } else if ((aspect & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) && vk_info->samples == 1) {
/* TODO: Disallow compression with :
*
* 1) non multiplanar images (We appear to hit a sampler bug with
}
}
}
- } else if ((aspect & VK_IMAGE_ASPECT_ANY_COLOR_BIT) && vk_info->samples > 1) {
+ } else if ((aspect & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) && vk_info->samples > 1) {
assert(!(vk_info->usage & VK_IMAGE_USAGE_STORAGE_BIT));
assert(image->planes[plane].aux_surface.isl.size == 0);
ok = isl_surf_get_mcs_surf(&dev->isl_dev,
/* The following switch currently only handles depth stencil aspects.
* TODO: Handle the color aspect.
*/
- if (image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT)
+ if (image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV)
return image->planes[plane].aux_usage;
switch (layout) {
/* Sampling Layouts */
case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
- assert((image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0);
+ assert((image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
/* Fall-through */
case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:
case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR:
static VkImageAspectFlags
remap_aspect_flags(VkImageAspectFlags view_aspects)
{
- if (view_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ if (view_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
if (_mesa_bitcount(view_aspects) == 1)
return VK_IMAGE_ASPECT_COLOR_BIT;
}
break;
case VK_IMAGE_ASPECT_PLANE_0_BIT_KHR:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0);
+ assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
sanitized_mask = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR;
break;
case VK_IMAGE_ASPECT_PLANE_1_BIT_KHR:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0);
+ assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
sanitized_mask = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR;
break;
case VK_IMAGE_ASPECT_PLANE_2_BIT_KHR:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0);
+ assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
sanitized_mask = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR;
break;
default:
return pipe_bits;
}
-#define VK_IMAGE_ASPECT_ANY_COLOR_BIT ( \
+#define VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV ( \
VK_IMAGE_ASPECT_COLOR_BIT | \
VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | \
VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | \
VK_IMAGE_ASPECT_PLANE_2_BIT_KHR)
-#define VK_IMAGE_ASPECT_PLANES_BITS ( \
+#define VK_IMAGE_ASPECT_PLANES_BITS_ANV ( \
VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | \
VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | \
VK_IMAGE_ASPECT_PLANE_2_BIT_KHR)
anv_plane_to_aspect(VkImageAspectFlags image_aspects,
uint32_t plane)
{
- if (image_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ if (image_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
if (_mesa_bitcount(image_aspects) > 1)
return VK_IMAGE_ASPECT_PLANE_0_BIT_KHR << plane;
return VK_IMAGE_ASPECT_COLOR_BIT;
/* If the underlying image has color plane aspects and
* VK_IMAGE_ASPECT_COLOR_BIT has been requested, then return the aspects of
* the underlying image. */
- if ((image->aspects & VK_IMAGE_ASPECT_PLANES_BITS) != 0 &&
+ if ((image->aspects & VK_IMAGE_ASPECT_PLANES_BITS_ANV) != 0 &&
aspects == VK_IMAGE_ASPECT_COLOR_BIT)
return image->aspects;
return true;
/* Only 1 color aspects are compatibles. */
- if ((aspects1 & VK_IMAGE_ASPECT_ANY_COLOR_BIT) != 0 &&
- (aspects2 & VK_IMAGE_ASPECT_ANY_COLOR_BIT) != 0 &&
+ if ((aspects1 & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) != 0 &&
+ (aspects2 & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) != 0 &&
_mesa_bitcount(aspects1) == _mesa_bitcount(aspects2))
return true;
enum fast_clear_state_field field)
{
assert(device && image);
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
assert(level < anv_image_aux_levels(image, aspect));
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
unsigned level, bool needs_resolve)
{
assert(cmd_buffer && image);
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
assert(level < anv_image_aux_levels(image, aspect));
const struct anv_address resolve_flag_addr =
unsigned level)
{
assert(cmd_buffer && image);
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
assert(level < anv_image_aux_levels(image, aspect));
const struct anv_address resolve_flag_addr =
unsigned level)
{
assert(cmd_buffer && image);
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
assert(level < anv_image_aux_levels(image, aspect));
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
bool copy_from_surface_state)
{
assert(cmd_buffer && image);
- assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
assert(level < anv_image_aux_levels(image, aspect));
struct anv_bo *ss_bo =
{
/* Validate the inputs. */
assert(cmd_buffer);
- assert(image && image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT);
+ assert(image && image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
/* These values aren't supported for simplicity's sake. */
assert(level_count != VK_REMAINING_MIP_LEVELS &&
layer_count != VK_REMAINING_ARRAY_LAYERS);
VkImageAspectFlags att_aspects = vk_format_aspects(att->format);
VkImageAspectFlags clear_aspects = 0;
- if (att_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ if (att_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
/* color attachment */
if (att->load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
clear_aspects |= VK_IMAGE_ASPECT_COLOR_BIT;
anv_assert(iview->n_planes == 1);
union isl_color_value clear_color = { .u32 = { 0, } };
- if (att_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ if (att_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
assert(att_aspects == VK_IMAGE_ASPECT_COLOR_BIT);
color_attachment_compute_aux_usage(cmd_buffer->device,
state, i, begin->renderArea,
transition_depth_buffer(cmd_buffer, image,
pImageMemoryBarriers[i].oldLayout,
pImageMemoryBarriers[i].newLayout);
- } else if (range->aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ } else if (range->aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
VkImageAspectFlags color_aspects =
anv_image_expand_aspects(image, range->aspectMask);
uint32_t aspect_bit;
}
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
assert(stage == MESA_SHADER_FRAGMENT);
- if ((desc->image_view->aspect_mask & VK_IMAGE_ASPECT_ANY_COLOR_BIT) == 0) {
+ if ((desc->image_view->aspect_mask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0) {
/* For depth and stencil input attachments, we treat it like any
* old texture that a user may have bound.
*/
att_state->input_aux_usage != att_state->aux_usage;
if (subpass_end) {
target_layout = att_desc->final_layout;
- } else if (iview->aspect_mask & VK_IMAGE_ASPECT_ANY_COLOR_BIT &&
+ } else if (iview->aspect_mask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV &&
!input_needs_resolve) {
/* Layout transitions before the final only help to enable sampling as
* an input attachment. If the input attachment supports sampling
att_state->aux_usage =
anv_layout_to_aux_usage(&cmd_buffer->device->info, image,
VK_IMAGE_ASPECT_DEPTH_BIT, target_layout);
- } else if (image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT) {
+ } else if (image->aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
assert(image->aspects == VK_IMAGE_ASPECT_COLOR_BIT);
transition_color_buffer(cmd_buffer, image, VK_IMAGE_ASPECT_COLOR_BIT,
iview->planes[0].isl.base_level, 1,