1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. 3cb93a386Sopenharmony_ci * Description: vulkan api partial render extended function. Will delete when vulkan-headers heuristic 4cb93a386Sopenharmony_ci * Create: 2023/11/27 5cb93a386Sopenharmony_ci */ 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ci#pragma once 8cb93a386Sopenharmony_ci 9cb93a386Sopenharmony_ci#ifdef __cplusplus 10cb93a386Sopenharmony_ciextern "C" { 11cb93a386Sopenharmony_ci#endif 12cb93a386Sopenharmony_ci 13cb93a386Sopenharmony_citypedef enum VkStructureTypeHUAWEI { 14cb93a386Sopenharmony_ci VK_STRUCTURE_TYPE_BLUR_COLOR_FILTER_INFO_HUAWEI = VK_STRUCTURE_TYPE_MAX_ENUM - 15, 15cb93a386Sopenharmony_ci VK_STRUCTURE_TYPE_BLUR_NOISE_INFO_HUAWEI = VK_STRUCTURE_TYPE_MAX_ENUM - 14, 16cb93a386Sopenharmony_ci VK_STRUCTURE_TYPE_DRAW_BLUR_IMAGE_INFO_HUAWEI = VK_STRUCTURE_TYPE_MAX_ENUM - 13, 17cb93a386Sopenharmony_ci VK_STRUCTURE_TYPE_RENDER_PASS_DAMAGE_REGION_BEGIN_INFO_TYPE = VK_STRUCTURE_TYPE_MAX_ENUM - 7 18cb93a386Sopenharmony_ci} VkstructureTypeHUAWEI; 19cb93a386Sopenharmony_ci 20cb93a386Sopenharmony_citypedef struct VkRenderPassDamageRegionBeginInfo { 21cb93a386Sopenharmony_ci VkStructureTypeHUAWEI sType; 22cb93a386Sopenharmony_ci const void* pNext; 23cb93a386Sopenharmony_ci uint32_t regionCount; 24cb93a386Sopenharmony_ci const VkRect2D* regions; 25cb93a386Sopenharmony_ci} VkRenderPassDamageRegionBeginInfo; 26cb93a386Sopenharmony_ci 27cb93a386Sopenharmony_ci#define VK_HUAWEI_DRAW_BLUR_IMAGE 1 28cb93a386Sopenharmony_ci#define VK_HUAWEI_DRAW_BLUR_IMAGE_SPEC_VERSION 10 29cb93a386Sopenharmony_ci#define VK_HUAWEI_DRAW_BLUR_IMAGE_EXTENSION_NAME "VK_HUAWEI_draw_blur_image" 30cb93a386Sopenharmony_ci 31cb93a386Sopenharmony_citypedef enum VkBlurOriginTypeHUAWEI { 32cb93a386Sopenharmony_ci BLUR_ORIGIN_NONE_FLIP_HUAWEI = 0, 33cb93a386Sopenharmony_ci BLUR_ORIGIN_Y_AXIS_FLIP_HUAWEI = 1, 34cb93a386Sopenharmony_ci} VkBlurOriginTypeHUAWEI; 35cb93a386Sopenharmony_ci 36cb93a386Sopenharmony_citypedef struct VkDrawBlurImageInfoHUAWEI { 37cb93a386Sopenharmony_ci VkStructureTypeHUAWEI sType; 38cb93a386Sopenharmony_ci const void* pNext; 39cb93a386Sopenharmony_ci float sigma; 40cb93a386Sopenharmony_ci VkBlurOriginTypeHUAWEI origin; 41cb93a386Sopenharmony_ci VkRect2D srcRegion; 42cb93a386Sopenharmony_ci VkRect2D dstRegion; 43cb93a386Sopenharmony_ci VkImageView srcImageView; 44cb93a386Sopenharmony_ci} VkDrawBlurImageInfoHUAWEI; 45cb93a386Sopenharmony_ci 46cb93a386Sopenharmony_citypedef struct VkBlurNoiseInfoHUAWEI { 47cb93a386Sopenharmony_ci VkStructureTypeHUAWEI sType; 48cb93a386Sopenharmony_ci const void* pNext; 49cb93a386Sopenharmony_ci float noiseRatio; 50cb93a386Sopenharmony_ci} VkBlurNoiseInfoHUAWEI; 51cb93a386Sopenharmony_ci 52cb93a386Sopenharmony_citypedef struct VkBlurColorFilterInfoHUAWEI { 53cb93a386Sopenharmony_ci VkStructureTypeHUAWEI sType; 54cb93a386Sopenharmony_ci const void* pNext; 55cb93a386Sopenharmony_ci float saturation; 56cb93a386Sopenharmony_ci float brightness; 57cb93a386Sopenharmony_ci} VkBlurColorFilterInfoHUAWEI; 58cb93a386Sopenharmony_ci 59cb93a386Sopenharmony_citypedef void (VKAPI_PTR *PFN_vkCmdDrawBlurImageHUAWEI)(VkCommandBuffer commandBuffer,\ 60cb93a386Sopenharmony_ci const VkDrawBlurImageInfoHUAWEI* drawBlurImageInfo); 61cb93a386Sopenharmony_ci 62cb93a386Sopenharmony_citypedef VkResult (VKAPI_PTR *PFN_vkGetBlurImageSizeHUAWEI)(VkDevice device, \ 63cb93a386Sopenharmony_ci const VkDrawBlurImageInfoHUAWEI *drawBlurImageInfo, VkRect2D *pSize); 64cb93a386Sopenharmony_ci 65cb93a386Sopenharmony_ci#ifndef VK_NO_PROTOTYPES 66cb93a386Sopenharmony_ciVKAPI_ATTR void VKAPI_CALL vkCmdDrawBlurImageHUAWEI( 67cb93a386Sopenharmony_ci VkCommandBuffer commandBuffer, 68cb93a386Sopenharmony_ci const VkDrawBlurImageInfoHUAWEI* drawBlurImageInfo); 69cb93a386Sopenharmony_ci 70cb93a386Sopenharmony_ciVKAPI_ATTR VkResult VKAPI_CALL vkGetBlurImageSizeHUAWEI( 71cb93a386Sopenharmony_ci VkDevice device, 72cb93a386Sopenharmony_ci const VkDrawBlurImageInfoHUAWEI* drawBlurImageInfo, 73cb93a386Sopenharmony_ci VkRect2D* pSize); 74cb93a386Sopenharmony_ci#endif 75cb93a386Sopenharmony_ci 76cb93a386Sopenharmony_ci#ifdef __cplusplus 77cb93a386Sopenharmony_ci} 78cb93a386Sopenharmony_ci#endif