uint32_t gem_handle = anv_gem_fd_to_handle(device, fd);
if (!gem_handle) {
pthread_mutex_unlock(&cache->mutex);
- return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR);
+ return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE);
}
struct anv_cached_bo *bo = anv_bo_cache_lookup_locked(cache, gem_handle);
if (size == (off_t)-1) {
anv_gem_close(device, gem_handle);
pthread_mutex_unlock(&cache->mutex);
- return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR);
+ return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE);
}
bo = vk_alloc(&device->alloc, sizeof(struct anv_cached_bo), 8,
* one of the AHARDWAREBUFFER_USAGE_GPU_* usage flags."
*/
if (!(desc.usage & (gpu_usage)))
- return VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR;
+ return VK_ERROR_INVALID_EXTERNAL_HANDLE;
/* Fill properties fields based on description. */
VkAndroidHardwareBufferFormatPropertiesANDROID *p = pProperties;
AHardwareBuffer_getNativeHandle(buffer);
int dma_buf = (handle && handle->numFds) ? handle->data[0] : -1;
if (dma_buf < 0)
- return VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR;
+ return VK_ERROR_INVALID_EXTERNAL_HANDLE;
/* All memory types. */
uint32_t memory_types = (1ull << pdevice->memory.type_count) - 1;
* Android hardware buffer object."
*
* "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID must
- * have been included in VkExportMemoryAllocateInfoKHR::handleTypes when
+ * have been included in VkExportMemoryAllocateInfo::handleTypes when
* memory was created."
*/
if (mem->ahw) {
*/
int dma_buf = (handle && handle->numFds) ? handle->data[0] : -1;
if (dma_buf < 0)
- return VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR;
+ return VK_ERROR_INVALID_EXTERNAL_HANDLE;
uint64_t bo_flags = ANV_BO_EXTERNAL;
if (device->instance->physicalDevice.supports_48bit_addresses)
if (gralloc_info->handle->numFds != 1) {
return vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"VkNativeBufferANDROID::handle::numFds is %d, "
"expected 1", gralloc_info->handle->numFds);
}
break;
case -1:
result = vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"DRM_IOCTL_I915_GEM_GET_TILING failed for "
"VkNativeBufferANDROID");
goto fail_tiling;
default:
result = vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"DRM_IOCTL_I915_GEM_GET_TILING returned unknown "
"tiling %d for VkNativeBufferANDROID", i915_tiling);
goto fail_tiling;
if (bo->size < image->size) {
result = vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"dma-buf from VkNativeBufferANDROID is too small for "
"VkImage: %"PRIu64"B < %"PRIu64"B",
bo->size, image->size);
* dEQP-VK.wsi.android.swapchain.*.image_usage to fail.
*/
- const VkPhysicalDeviceImageFormatInfo2KHR image_format_info = {
- .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR,
+ const VkPhysicalDeviceImageFormatInfo2 image_format_info = {
+ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
.format = format,
.type = VK_IMAGE_TYPE_2D,
.tiling = VK_IMAGE_TILING_OPTIMAL,
.usage = imageUsage,
};
- VkImageFormatProperties2KHR image_format_props = {
- .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR,
+ VkImageFormatProperties2 image_format_props = {
+ .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
};
/* Check that requested format and usage are supported. */
template->entry_count = pCreateInfo->descriptorUpdateEntryCount;
for (uint32_t i = 0; i < template->entry_count; i++) {
- const VkDescriptorUpdateTemplateEntryKHR *pEntry =
+ const VkDescriptorUpdateTemplateEntry *pEntry =
&pCreateInfo->pDescriptorUpdateEntries[i];
template->entries[i] = (struct anv_descriptor_template_entry) {
break;
}
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR: {
- VkPhysicalDevice16BitStorageFeaturesKHR *features =
- (VkPhysicalDevice16BitStorageFeaturesKHR *)ext;
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
+ VkPhysicalDevice16BitStorageFeatures *features =
+ (VkPhysicalDevice16BitStorageFeatures *)ext;
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
features->storageBuffer16BitAccess = pdevice->info.gen >= 8;
*/
if (mem->bo->size < aligned_alloc_size) {
result = vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"aligned allocationSize too large for "
- "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: "
+ "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT: "
"%"PRIu64"B > %"PRIu64"B",
aligned_alloc_size, mem->bo->size);
anv_bo_cache_release(device, &device->bo_cache, mem->bo);
if (result != VK_SUCCESS)
goto fail;
- const VkMemoryDedicatedAllocateInfoKHR *dedicated_info =
- vk_find_struct_const(pAllocateInfo->pNext, MEMORY_DEDICATED_ALLOCATE_INFO_KHR);
+ const VkMemoryDedicatedAllocateInfo *dedicated_info =
+ vk_find_struct_const(pAllocateInfo->pNext, MEMORY_DEDICATED_ALLOCATE_INFO);
if (dedicated_info && dedicated_info->image != VK_NULL_HANDLE) {
ANV_FROM_HANDLE(anv_image, image, dedicated_info->image);
VkResult anv_GetMemoryFdPropertiesKHR(
VkDevice _device,
- VkExternalMemoryHandleTypeFlagBitsKHR handleType,
+ VkExternalMemoryHandleTypeFlagBits handleType,
int fd,
VkMemoryFdPropertiesKHR* pMemoryFdProperties)
{
switch (ext->sType) {
case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: {
struct anv_physical_device *pdevice = &device->instance->physicalDevice;
- const VkImagePlaneMemoryRequirementsInfoKHR *plane_reqs =
- (const VkImagePlaneMemoryRequirementsInfoKHR *) ext;
+ const VkImagePlaneMemoryRequirementsInfo *plane_reqs =
+ (const VkImagePlaneMemoryRequirementsInfo *) ext;
uint32_t plane = anv_image_aspect_to_plane(image->aspects,
plane_reqs->planeAspect);
case VK_IMAGE_ASPECT_COLOR_BIT: suffix = "c"; break;
case VK_IMAGE_ASPECT_DEPTH_BIT: suffix = "d"; break;
case VK_IMAGE_ASPECT_STENCIL_BIT: suffix = "s"; break;
- case VK_IMAGE_ASPECT_PLANE_0_BIT_KHR: suffix = "c0"; break;
- case VK_IMAGE_ASPECT_PLANE_1_BIT_KHR: suffix = "c1"; break;
- case VK_IMAGE_ASPECT_PLANE_2_BIT_KHR: suffix = "c2"; break;
+ case VK_IMAGE_ASPECT_PLANE_0_BIT: suffix = "c0"; break;
+ case VK_IMAGE_ASPECT_PLANE_1_BIT: suffix = "c1"; break;
+ case VK_IMAGE_ASPECT_PLANE_2_BIT: suffix = "c2"; break;
default:
unreachable("Invalid aspect");
}
flags |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
VK_FORMAT_FEATURE_BLIT_DST_BIT |
- VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
- VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
+ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT;
return flags;
}
struct anv_physical_device *physical_device,
const VkPhysicalDeviceImageFormatInfo2 *info,
VkImageFormatProperties *pImageFormatProperties,
- VkSamplerYcbcrConversionImageFormatPropertiesKHR *pYcbcrImageFormatProperties)
+ VkSamplerYcbcrConversionImageFormatProperties *pYcbcrImageFormatProperties)
{
VkFormatFeatureFlags format_feature_flags;
VkExtent3D maxExtent;
{
ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
const VkPhysicalDeviceExternalImageFormatInfo *external_info = NULL;
- VkExternalImageFormatPropertiesKHR *external_props = NULL;
+ VkExternalImageFormatProperties *external_props = NULL;
VkSamplerYcbcrConversionImageFormatProperties *ycbcr_props = NULL;
struct VkAndroidHardwareBufferUsageANDROID *android_usage = NULL;
VkResult result;
ANV_FROM_HANDLE(anv_image, image, _image);
const struct anv_surface *surface;
- if (subresource->aspectMask == VK_IMAGE_ASPECT_PLANE_1_BIT_KHR &&
+ if (subresource->aspectMask == VK_IMAGE_ASPECT_PLANE_1_BIT &&
image->drm_format_mod != DRM_FORMAT_MOD_INVALID &&
isl_drm_modifier_has_aux(image->drm_format_mod))
surface = &image->planes[0].aux_surface;
* VK_IMAGE_ASPECT_COLOR_BIT will be converted to
* VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT |
* VK_IMAGE_ASPECT_PLANE_2_BIT for an image of format
- * VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR.
+ * VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM.
*/
VkImageAspectFlags expanded_aspects =
anv_image_expand_aspects(image, range->aspectMask);
if (mem->bo->size < aligned_image_size) {
result = vk_errorf(device->instance, device,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE,
"dma-buf too small for image in "
"vkCreateDmaBufImageINTEL: %"PRIu64"B < "PRIu64"B",
mem->bo->size, aligned_image_size);
y_range(nir_builder *b,
nir_ssa_def *y_channel,
int bpc,
- VkSamplerYcbcrRangeKHR range)
+ VkSamplerYcbcrRange range)
{
switch (range) {
case VK_SAMPLER_YCBCR_RANGE_ITU_FULL:
chroma_range(nir_builder *b,
nir_ssa_def *chroma_channel,
int bpc,
- VkSamplerYcbcrRangeKHR range)
+ VkSamplerYcbcrRange range)
{
switch (range) {
case VK_SAMPLER_YCBCR_RANGE_ITU_FULL:
}
static const nir_const_value *
-ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversionKHR model)
+ycbcr_model_to_rgb_matrix(VkSamplerYcbcrModelConversion model)
{
switch (model) {
case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601: {
vk_foreach_struct(ext, pCreateInfo->pNext) {
switch (ext->sType) {
- case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR: {
- VkRenderPassMultiviewCreateInfoKHR *mv = (void *)ext;
+ case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: {
+ VkRenderPassMultiviewCreateInfo *mv = (void *)ext;
for (uint32_t i = 0; i < mv->subpassCount; i++) {
pass->subpasses[i].view_mask = mv->pViewMasks[i];
/* The descriptor set this template corresponds to. This value is only
* valid if the template was created with the templateType
- * VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR.
+ * VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET.
*/
uint8_t set;
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_pool, VkDescriptorPool)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_set, VkDescriptorSet)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_set_layout, VkDescriptorSetLayout)
-ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_update_template, VkDescriptorUpdateTemplateKHR)
+ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_update_template, VkDescriptorUpdateTemplate)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_device_memory, VkDeviceMemory)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_fence, VkFence)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_event, VkEvent)
void anv_GetPhysicalDeviceExternalFenceProperties(
VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
- VkExternalFencePropertiesKHR* pExternalFenceProperties)
+ const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
+ VkExternalFenceProperties* pExternalFenceProperties)
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
if (semaphore == NULL)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- const VkExportSemaphoreCreateInfoKHR *export =
+ const VkExportSemaphoreCreateInfo *export =
vk_find_struct_const(pCreateInfo->pNext, EXPORT_SEMAPHORE_CREATE_INFO);
- VkExternalSemaphoreHandleTypeFlagsKHR handleTypes =
+ VkExternalSemaphoreHandleTypeFlags handleTypes =
export ? export->handleTypes : 0;
if (handleTypes == 0) {
void anv_GetPhysicalDeviceExternalSemaphoreProperties(
VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
- VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties)
+ const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
+ VkExternalSemaphoreProperties* pExternalSemaphoreProperties)
{
ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
if (new_impl.bo->size < 4096) {
anv_bo_cache_release(device, &device->bo_cache, new_impl.bo);
- return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR);
+ return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE);
}
/* If we're going to use this as a fence, we need to *not* have the
get_scratch_address(pipeline, MESA_SHADER_TESS_CTRL, tcs_bin);
}
- const VkPipelineTessellationDomainOriginStateCreateInfoKHR *domain_origin_state =
- tess_info ? vk_find_struct_const(tess_info, PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR) : NULL;
+ const VkPipelineTessellationDomainOriginStateCreateInfo *domain_origin_state =
+ tess_info ? vk_find_struct_const(tess_info, PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO) : NULL;
- VkTessellationDomainOriginKHR uv_origin =
+ VkTessellationDomainOrigin uv_origin =
domain_origin_state ? domain_origin_state->domainOrigin :
- VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR;
+ VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT;
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_TE), te) {
te.Partitioning = tes_prog_data->partitioning;
- if (uv_origin == VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR) {
+ if (uv_origin == VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT) {
te.OutputTopology = tes_prog_data->output_topology;
} else {
/* When the origin is upper-left, we have to flip the winding order */