mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
anv: Drop unneeded struct keywords
All VkFoo structs are typedef'd to not need the struct keyword. Leaving it in there is just extra characters and breaks Vulkan's aliasing when stuff gets promoted to core versions. It's better to just never use struct for VkFoo. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
8dc7c467e6
commit
9bd8000c6c
10 changed files with 18 additions and 18 deletions
|
|
@ -389,14 +389,14 @@ VkResult
|
|||
anv_image_from_external(
|
||||
VkDevice device_h,
|
||||
const VkImageCreateInfo *base_info,
|
||||
const struct VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
VkImage *out_image_h)
|
||||
{
|
||||
#if ANDROID_API_LEVEL >= 26
|
||||
ANV_FROM_HANDLE(anv_device, device, device_h);
|
||||
|
||||
const struct VkExternalFormatANDROID *ext_info =
|
||||
const VkExternalFormatANDROID *ext_info =
|
||||
vk_find_struct_const(base_info->pNext, EXTERNAL_FORMAT_ANDROID);
|
||||
|
||||
if (ext_info && ext_info->externalFormat != 0) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ VkResult anv_image_from_gralloc(VkDevice device_h,
|
|||
|
||||
VkResult anv_image_from_external(VkDevice device_h,
|
||||
const VkImageCreateInfo *base_info,
|
||||
const struct VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
VkImage *out_image_h);
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ anv_create_ahw_memory(VkDevice device_h,
|
|||
VkResult
|
||||
anv_image_from_external(VkDevice device_h,
|
||||
const VkImageCreateInfo *base_info,
|
||||
const struct VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkExternalMemoryImageCreateInfo *create_info,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
VkImage *out_image_h)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -985,7 +985,7 @@ anv_descriptor_set_create(struct anv_device *device,
|
|||
* will always write in the immutable sampler regardless of what
|
||||
* is in the sampler parameter.
|
||||
*/
|
||||
struct VkDescriptorImageInfo info = { };
|
||||
VkDescriptorImageInfo info = { };
|
||||
anv_descriptor_set_write_image_view(device, set, &info,
|
||||
VK_DESCRIPTOR_TYPE_SAMPLER,
|
||||
b, i);
|
||||
|
|
|
|||
|
|
@ -3186,7 +3186,7 @@ VkResult anv_AllocateMemory(
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
const struct VkImportAndroidHardwareBufferInfoANDROID import_info = {
|
||||
const VkImportAndroidHardwareBufferInfoANDROID import_info = {
|
||||
.buffer = mem->ahw,
|
||||
};
|
||||
result = anv_import_ahw_memory(_device, mem, &import_info);
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2(
|
|||
const VkPhysicalDeviceExternalImageFormatInfo *external_info = NULL;
|
||||
VkExternalImageFormatProperties *external_props = NULL;
|
||||
VkSamplerYcbcrConversionImageFormatProperties *ycbcr_props = NULL;
|
||||
struct VkAndroidHardwareBufferUsageANDROID *android_usage = NULL;
|
||||
VkAndroidHardwareBufferUsageANDROID *android_usage = NULL;
|
||||
VkResult result;
|
||||
|
||||
/* Extract input structs */
|
||||
|
|
@ -1221,7 +1221,7 @@ VkResult anv_CreateSamplerYcbcrConversion(
|
|||
|
||||
/* Search for VkExternalFormatANDROID and resolve the format. */
|
||||
struct anv_format *ext_format = NULL;
|
||||
const struct VkExternalFormatANDROID *ext_info =
|
||||
const VkExternalFormatANDROID *ext_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, EXTERNAL_FORMAT_ANDROID);
|
||||
|
||||
uint64_t format = ext_info ? ext_info->externalFormat : 0;
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ anv_CreateImage(VkDevice device,
|
|||
const VkAllocationCallbacks *pAllocator,
|
||||
VkImage *pImage)
|
||||
{
|
||||
const struct VkExternalMemoryImageCreateInfo *create_info =
|
||||
const VkExternalMemoryImageCreateInfo *create_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
|
||||
|
||||
if (create_info && (create_info->handleTypes &
|
||||
|
|
@ -754,7 +754,7 @@ anv_CreateImage(VkDevice device,
|
|||
pAllocator, pImage);
|
||||
|
||||
bool use_external_format = false;
|
||||
const struct VkExternalFormatANDROID *ext_format =
|
||||
const VkExternalFormatANDROID *ext_format =
|
||||
vk_find_struct_const(pCreateInfo->pNext, EXTERNAL_FORMAT_ANDROID);
|
||||
|
||||
/* "If externalFormat is zero, the effect is as if the
|
||||
|
|
@ -1590,7 +1590,7 @@ anv_CreateImageView(VkDevice _device,
|
|||
|
||||
/* Check if a conversion info was passed. */
|
||||
const struct anv_format *conv_format = NULL;
|
||||
const struct VkSamplerYcbcrConversionInfo *conv_info =
|
||||
const VkSamplerYcbcrConversionInfo *conv_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, SAMPLER_YCBCR_CONVERSION_INFO);
|
||||
|
||||
/* If image has an external format, the pNext chain must contain an instance of
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ VkResult anv_CreateRenderPass(
|
|||
|
||||
for (uint32_t i = 0; i < pCreateInfo->dependencyCount; i++) {
|
||||
/* Convert to a Dependency2KHR */
|
||||
struct VkSubpassDependency2KHR dep2 = {
|
||||
VkSubpassDependency2KHR dep2 = {
|
||||
.srcSubpass = pCreateInfo->pDependencies[i].srcSubpass,
|
||||
.dstSubpass = pCreateInfo->pDependencies[i].dstSubpass,
|
||||
.srcStageMask = pCreateInfo->pDependencies[i].srcStageMask,
|
||||
|
|
|
|||
|
|
@ -3812,9 +3812,9 @@ anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
|
|||
enum isl_format
|
||||
anv_isl_format_for_descriptor_type(VkDescriptorType type);
|
||||
|
||||
static inline struct VkExtent3D
|
||||
static inline VkExtent3D
|
||||
anv_sanitize_image_extent(const VkImageType imageType,
|
||||
const struct VkExtent3D imageExtent)
|
||||
const VkExtent3D imageExtent)
|
||||
{
|
||||
switch (imageType) {
|
||||
case VK_IMAGE_TYPE_1D:
|
||||
|
|
@ -3828,9 +3828,9 @@ anv_sanitize_image_extent(const VkImageType imageType,
|
|||
}
|
||||
}
|
||||
|
||||
static inline struct VkOffset3D
|
||||
static inline VkOffset3D
|
||||
anv_sanitize_image_offset(const VkImageType imageType,
|
||||
const struct VkOffset3D imageOffset)
|
||||
const VkOffset3D imageOffset)
|
||||
{
|
||||
switch (imageType) {
|
||||
case VK_IMAGE_TYPE_1D:
|
||||
|
|
|
|||
|
|
@ -447,8 +447,8 @@ VkResult genX(CreateSampler)(
|
|||
}
|
||||
#if GEN_GEN >= 9
|
||||
case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: {
|
||||
struct VkSamplerReductionModeCreateInfoEXT *sampler_reduction =
|
||||
(struct VkSamplerReductionModeCreateInfoEXT *) ext;
|
||||
VkSamplerReductionModeCreateInfoEXT *sampler_reduction =
|
||||
(VkSamplerReductionModeCreateInfoEXT *) ext;
|
||||
sampler_reduction_mode =
|
||||
vk_to_gen_sampler_reduction_mode[sampler_reduction->reductionMode];
|
||||
enable_sampler_reduction = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue