summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-05-17 13:14:45 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2017-05-17 13:24:32 -0700
commitd3a4aa1e59ed8891d345417ad341dfb442c9456f (patch)
tree6f9683005d0423f200b5e25b7c7d4ef120a466a5 /include
parent1e1be2451b0757902ecd2405ade0c0186a952b2a (diff)
t: Get rid of t_mem_type_index
There isn't a single type index that works for all mmapable things. Instead, we need to actually look at the requirements.
Diffstat (limited to 'include')
-rw-r--r--include/tapi/t_data.h23
-rw-r--r--include/util/cru_image.h2
2 files changed, 1 insertions, 24 deletions
diff --git a/include/tapi/t_data.h b/include/tapi/t_data.h
index 99f1b73..9610670 100644
--- a/include/tapi/t_data.h
+++ b/include/tapi/t_data.h
@@ -22,25 +22,6 @@
/// \file
/// \brief Test data
///
-/// Crucible provides some default Vulkan memory types, described below. On
-/// UMA systems, the default-provided types may be identical, because the
-/// Vulkan implementation may expose only a single type. On NUMA systems, the
-/// default-provided types are likely to be distinct. To ensure that your test
-/// works correctly on NUMA systems, write your test assuming that
-/// t_mem_type_index_for_mmap and t_mem_type_index_for_device_access point to
-/// distinct types.
-///
-/// - t_mem_type_index_for_mmap: Prefer this memory type when allocating
-/// memory that will be mapped with vkMapMemory. This type has properties
-/// VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT and
-/// VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT. The Vulkan spec requires
-/// implementations to expose at least one such memory type.
-///
-/// - t_mem_type_for_device_access: Prefer this memory type for best
-/// performance during device-access. This type may have no property but
-/// VK_MEMORY_PROPERTY_DEVICE_ONLY, which excludes support for
-/// vkMapMemory.
-///
#pragma once
@@ -57,8 +38,6 @@ typedef struct cru_image cru_image_t;
#define t_physical_dev (*__t_physical_dev())
#define t_physical_dev_props (__t_physical_dev_props())
#define t_physical_dev_mem_props (__t_physical_dev_mem_props())
-#define t_mem_type_index_for_mmap (__t_mem_type_index_for_mmap())
-#define t_mem_type_index_for_device_access (__t_mem_type_index_for_device_access())
#define t_device (*__t_device())
#define t_queue (*__t_queue())
#define t_descriptor_pool (*__t_descriptor_pool())
@@ -84,8 +63,6 @@ const VkDevice *__t_device(void);
const VkPhysicalDevice *__t_physical_dev(void);
const VkPhysicalDeviceProperties *__t_physical_dev_props(void);
const VkPhysicalDeviceMemoryProperties *__t_physical_dev_mem_props(void);
-const uint32_t __t_mem_type_index_for_mmap(void);
-const uint32_t __t_mem_type_index_for_device_access(void);
const VkQueue *__t_queue(void);
const VkDescriptorPool *__t_descriptor_pool(void);
const VkCommandPool *__t_cmd_pool(void);
diff --git a/include/util/cru_image.h b/include/util/cru_image.h
index 610fe89..48db399 100644
--- a/include/util/cru_image.h
+++ b/include/util/cru_image.h
@@ -92,7 +92,7 @@ cru_image_from_vk_image(VkDevice dev, VkQueue queue, VkImage image,
VkFormat format, VkImageAspectFlagBits aspect,
uint32_t level0_width, uint32_t level0_height,
uint32_t miplevel, uint32_t array_slice,
- uint32_t tmp_mem_type_index);
+ VkMemoryPropertyFlags tmp_mem_props);
bool cru_image_write_file(cru_image_t *image, const char *filename);
bool cru_image_copy(cru_image_t *dest, cru_image_t *src);