summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-18 16:35:22 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-18 16:35:22 +0000
commit8356e8a99fbb4eda182e838e202c11530ed81403 (patch)
treed15c365da03ab64b1776dea43d1e2b754d03365b /Graphics/GraphicsEngineVulkan
parentMerge from master (diff)
downloadDiligentCore-8356e8a99fbb4eda182e838e202c11530ed81403.tar.gz
DiligentCore-8356e8a99fbb4eda182e838e202c11530ed81403.zip
Renamed USAGE_CPU_ACCESSIBLE to USAGE_STAGING
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanMemoryManager.cpp20
4 files changed, 16 insertions, 16 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
index d28cfb7a..c7967e8d 100644
--- a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
@@ -52,7 +52,7 @@ BufferVkImpl :: BufferVkImpl(IReferenceCounters* pRefCounters,
if( m_Desc.Usage == USAGE_DYNAMIC && pBuffData != nullptr && pBuffData->pData != nullptr )
LOG_BUFFER_ERROR_AND_THROW("Dynamic buffer must be initialized via Map()")
- if (m_Desc.Usage == USAGE_CPU_ACCESSIBLE)
+ if (m_Desc.Usage == USAGE_STAGING)
{
if (m_Desc.CPUAccessFlags != CPU_ACCESS_WRITE && m_Desc.CPUAccessFlags != CPU_ACCESS_READ)
LOG_BUFFER_ERROR_AND_THROW("Exactly one of the CPU_ACCESS_WRITE or CPU_ACCESS_READ flags must be specified for a cpu-accessible buffer")
@@ -171,7 +171,7 @@ BufferVkImpl :: BufferVkImpl(IReferenceCounters* pRefCounters,
VkMemoryRequirements MemReqs = LogicalDevice.GetBufferMemoryRequirements(m_VulkanBuffer);
VkMemoryPropertyFlags BufferMemoryFlags = 0;
- if (m_Desc.Usage == USAGE_CPU_ACCESSIBLE)
+ if (m_Desc.Usage == USAGE_STAGING)
BufferMemoryFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
else
BufferMemoryFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index daabca38..eeb30132 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -1215,7 +1215,7 @@ namespace Diligent
}
else if(MapType == MAP_WRITE)
{
- if (BuffDesc.Usage == USAGE_CPU_ACCESSIBLE)
+ if (BuffDesc.Usage == USAGE_STAGING)
{
LOG_ERROR("Not implemented");
UNSUPPORTED("Not implemented");
@@ -1248,7 +1248,7 @@ namespace Diligent
}
else
{
- LOG_ERROR("Only USAGE_DYNAMIC and USAGE_CPU_ACCESSIBLE Vk buffers can be mapped for writing");
+ LOG_ERROR("Only USAGE_DYNAMIC and USAGE_STAGING Vk buffers can be mapped for writing");
}
}
else if(MapType == MAP_READ_WRITE)
@@ -1274,7 +1274,7 @@ namespace Diligent
}
else if(MapType == MAP_WRITE)
{
- if (BuffDesc.Usage == USAGE_CPU_ACCESSIBLE)
+ if (BuffDesc.Usage == USAGE_STAGING)
{
LOG_ERROR("This map type is not yet supported");
UNSUPPORTED("This map type is not yet supported");
diff --git a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
index f6703fac..9838966e 100644
--- a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
@@ -146,7 +146,7 @@ TextureVkImpl :: TextureVkImpl(IReferenceCounters* pRefCounters,
VkMemoryRequirements MemReqs = LogicalDevice.GetImageMemoryRequirements(m_VulkanImage);
VkMemoryPropertyFlags ImageMemoryFlags = 0;
- if (m_Desc.Usage == USAGE_CPU_ACCESSIBLE)
+ if (m_Desc.Usage == USAGE_STAGING)
ImageMemoryFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
else
ImageMemoryFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanMemoryManager.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanMemoryManager.cpp
index e072dfb0..fd597327 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanMemoryManager.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanMemoryManager.cpp
@@ -108,19 +108,19 @@ VulkanMemoryAllocation VulkanMemoryManager::Allocate(const VkMemoryRequirements&
if (MemoryProps == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
{
// There must be at least one memory type with the DEVICE_LOCAL_BIT bit set
- VERIFY(MemoryTypeIndex != VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex,
- "Vulkan spec requires that memoryTypeBits member always contains "
- "at least one bit set corresponding to a VkMemoryType with a propertyFlags that has the "
- "VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set (11.6)");
+ DEV_CHECK_ERR(MemoryTypeIndex != VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex,
+ "Vulkan spec requires that memoryTypeBits member always contains "
+ "at least one bit set corresponding to a VkMemoryType with a propertyFlags that has the "
+ "VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set (11.6)");
}
else if ( (MemoryProps & (VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) == (VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT))
{
- VERIFY(MemoryTypeIndex != VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex,
- "Vulkan spec requires that for a VkBuffer not created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT "
- "bit set, or for a VkImage that was created with a VK_IMAGE_TILING_LINEAR value in the tiling member "
- "of the VkImageCreateInfo structure passed to vkCreateImage, the memoryTypeBits member always contains "
- "at least one bit set corresponding to a VkMemoryType with a propertyFlags that has both the "
- "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit AND the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set. (11.6)");
+ DEV_CHECK_ERR(MemoryTypeIndex != VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex,
+ "Vulkan spec requires that for a VkBuffer not created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT "
+ "bit set, or for a VkImage that was created with a VK_IMAGE_TILING_LINEAR value in the tiling member "
+ "of the VkImageCreateInfo structure passed to vkCreateImage, the memoryTypeBits member always contains "
+ "at least one bit set corresponding to a VkMemoryType with a propertyFlags that has both the "
+ "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit AND the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set. (11.6)");
}
else if (MemoryTypeIndex == VulkanUtilities::VulkanPhysicalDevice::InvalidMemoryTypeIndex)
{