Skip to content

Commit

Permalink
Vulkan: Use linear tiling
Browse files Browse the repository at this point in the history
The external memory sharing spec does not require
OpenCL to deduce if a Vulkan image is tiled or linear.
Use tiled images.

Additionally, when selecting a queue family, the Vulkan
implementation is not required to report the transfer bit
for compute or graphics queues, it is implied.
  • Loading branch information
joshqti authored and lakshmih committed Nov 3, 2022
1 parent 9794aae commit 3491ae3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
const VulkanInstance& getVulkanInstance();
const VulkanPhysicalDevice& getVulkanPhysicalDevice();
const VulkanQueueFamily&
getVulkanQueueFamily(uint32_t queueFlags = VULKAN_QUEUE_FLAG_MASK_ALL);
getVulkanQueueFamily(uint32_t queueFlags = VULKAN_QUEUE_FLAG_COMPUTE| VULKAN_QUEUE_FLAG_GRAPHICS );
const VulkanMemoryType&
getVulkanMemoryType(const VulkanDevice& device,
VulkanMemoryTypeProperty memoryTypeProperty);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ VulkanImage2D::VulkanImage2D(
: VulkanImage(device, VULKAN_IMAGE_TYPE_2D, format,
VulkanExtent3D(width, height, 1), numMipLevels, 1,
externalMemoryHandleType, imageCreateFlag,
VULKAN_IMAGE_TILING_OPTIMAL, imageUsage, sharingMode)
VULKAN_IMAGE_TILING_LINEAR, imageUsage, sharingMode)
{}

VulkanImage2D::~VulkanImage2D() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ class VulkanImage {
VulkanExternalMemoryHandleType externalMemoryHandleType =
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
VulkanImageCreateFlag imageCreateFlags = VULKAN_IMAGE_CREATE_FLAG_NONE,
VulkanImageTiling imageTiling = VULKAN_IMAGE_TILING_OPTIMAL,
VulkanImageTiling imageTiling = VULKAN_IMAGE_TILING_LINEAR,
VulkanImageUsage imageUsage =
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
Expand Down

0 comments on commit 3491ae3

Please sign in to comment.