turnip: Drop tu_legacy.c

The remaining three helpers all have helpers in the common code.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
This commit is contained in:
Jason Ekstrand 2022-03-18 09:51:51 -05:00
parent 205bf5d9cb
commit 2a779f98dc
2 changed files with 0 additions and 89 deletions

View File

@ -41,7 +41,6 @@ libtu_files = files(
'tu_descriptor_set.h',
'tu_formats.c',
'tu_image.c',
'tu_legacy.c',
'tu_nir_lower_multiview.c',
'tu_pass.c',
'tu_pipeline.c',

View File

@ -1,88 +0,0 @@
/*
* Copyright 2020 Valve Corporation
* SPDX-License-Identifier: MIT
*
* Authors:
* Jonathan Marek <jonathan@marek.ca>
*/
#include <vulkan/vulkan.h>
#include <vulkan/vk_android_native_buffer.h> /* android tu_entrypoints.h depends on this */
#include <assert.h>
#include "tu_entrypoints.h"
#include "vk_util.h"
VKAPI_ATTR void VKAPI_CALL
tu_GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice pdev,
uint32_t *count,
VkQueueFamilyProperties *props)
{
if (!props)
return tu_GetPhysicalDeviceQueueFamilyProperties2(pdev, count, NULL);
VkQueueFamilyProperties2 props2[*count];
for (uint32_t i = 0; i < *count; i++) {
props2[i].sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2;
props2[i].pNext = NULL;
}
tu_GetPhysicalDeviceQueueFamilyProperties2(pdev, count, props2);
for (uint32_t i = 0; i < *count; i++)
props[i] = props2[i].queueFamilyProperties;
}
VKAPI_ATTR void VKAPI_CALL
tu_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice pdev,
VkFormat format,
VkImageType type,
VkSampleCountFlagBits samples,
VkImageUsageFlags usage,
VkImageTiling tiling,
uint32_t *count,
VkSparseImageFormatProperties *props)
{
const VkPhysicalDeviceSparseImageFormatInfo2 info = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
.format = format,
.type = type,
.samples = samples,
.usage = usage,
.tiling = tiling,
};
if (!props)
return tu_GetPhysicalDeviceSparseImageFormatProperties2(pdev, &info, count, NULL);
VkSparseImageFormatProperties2 props2[*count];
for (uint32_t i = 0; i < *count; i++) {
props2[i].sType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2;
props2[i].pNext = NULL;
}
tu_GetPhysicalDeviceSparseImageFormatProperties2(pdev, &info, count, props2);
for (uint32_t i = 0; i < *count; i++)
props[i] = props2[i].properties;
}
VKAPI_ATTR void VKAPI_CALL
tu_GetImageSparseMemoryRequirements(VkDevice device,
VkImage image,
uint32_t *count,
VkSparseImageMemoryRequirements *reqs)
{
const VkImageSparseMemoryRequirementsInfo2 info = {
.sType = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
.image = image
};
if (!reqs)
return tu_GetImageSparseMemoryRequirements2(device, &info, count, NULL);
VkSparseImageMemoryRequirements2 reqs2[*count];
for (uint32_t i = 0; i < *count; i++) {
reqs2[i].sType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2;
reqs2[i].pNext = NULL;
}
tu_GetImageSparseMemoryRequirements2(device, &info, count, reqs2);
for (uint32_t i = 0; i < *count; i++)
reqs[i] = reqs2[i].memoryRequirements;
}