Extension('VK_EXT_queue_family_foreign', 1, 'ANDROID'),
Extension('VK_EXT_sampler_filter_minmax', 1, 'device->info.gen >= 9'),
Extension('VK_EXT_scalar_block_layout', 1, True),
+ Extension('VK_EXT_separate_stencil_usage', 1, True),
Extension('VK_EXT_shader_stencil_export', 1, 'device->info.gen >= 9'),
Extension('VK_EXT_shader_viewport_index_layer', 1, True),
Extension('VK_EXT_transform_feedback', 1, True),
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
external_info = (const void *) s;
break;
+ case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT:
+ /* Ignore but don't warn */
+ break;
default:
anv_debug_ignored_stype(s->sType);
break;
if (dev->info.gen <= 7 &&
aspect == VK_IMAGE_ASPECT_STENCIL_BIT &&
- (image->usage & VK_IMAGE_USAGE_SAMPLED_BIT)) {
+ (image->stencil_usage & VK_IMAGE_USAGE_SAMPLED_BIT)) {
needs_shadow = true;
}
image->drm_format_mod = isl_mod_info ? isl_mod_info->modifier :
DRM_FORMAT_MOD_INVALID;
+ if (image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
+ image->stencil_usage = pCreateInfo->usage;
+ const VkImageStencilUsageCreateInfoEXT *stencil_usage_info =
+ vk_find_struct_const(pCreateInfo->pNext,
+ IMAGE_STENCIL_USAGE_CREATE_INFO_EXT);
+ if (stencil_usage_info)
+ image->stencil_usage = stencil_usage_info->stencilUsage;
+ }
+
/* In case of external format, We don't know format yet,
* so skip the rest for now.
*/
uint32_t array_size;
uint32_t samples; /**< VkImageCreateInfo::samples */
uint32_t n_planes;
- VkImageUsageFlags usage; /**< Superset of VkImageCreateInfo::usage. */
+ VkImageUsageFlags usage; /**< VkImageCreateInfo::usage. */
+ VkImageUsageFlags stencil_usage;
VkImageCreateFlags create_flags; /* Flags used when creating image. */
VkImageTiling tiling; /** VkImageCreateInfo::tiling */