Skip to content

Commit

Permalink
layers: More cleaup of format size compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Jan 23, 2025
1 parent cfe6a55 commit 7f8007a
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 178 deletions.
210 changes: 87 additions & 123 deletions layers/core_checks/cc_copy_blit_resolve.cpp

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions layers/core_checks/cc_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

#include <string>
#include <vulkan/utility/vk_format_utils.h>
#include <vulkan/vk_enum_string_helper.h>

#include "core_validation.h"
Expand Down Expand Up @@ -334,13 +335,12 @@ bool CoreChecks::PreCallValidateCreateImage(VkDevice device, const VkImageCreate
format_limits.maxMipLevels, string_VkFormat(pCreateInfo->format));
}

uint64_t texel_count = static_cast<uint64_t>(pCreateInfo->extent.width) *
static_cast<uint64_t>(pCreateInfo->extent.height) *
static_cast<uint64_t>(pCreateInfo->extent.depth) * static_cast<uint64_t>(pCreateInfo->arrayLayers) *
static_cast<uint64_t>(pCreateInfo->samples);

// Depth/Stencil formats size can't be accurately calculated
if (!vkuFormatIsDepthAndStencil(pCreateInfo->format)) {
const uint64_t texel_count =
static_cast<uint64_t>(pCreateInfo->extent.width) * static_cast<uint64_t>(pCreateInfo->extent.height) *
static_cast<uint64_t>(pCreateInfo->extent.depth) * static_cast<uint64_t>(pCreateInfo->arrayLayers) *
static_cast<uint64_t>(pCreateInfo->samples);
uint64_t total_size =
static_cast<uint64_t>(std::ceil(vkuFormatTexelSize(pCreateInfo->format) * static_cast<double>(texel_count)));

Expand All @@ -350,6 +350,7 @@ bool CoreChecks::PreCallValidateCreateImage(VkDevice device, const VkImageCreate
total_size = (total_size + ig_mask) & ~ig_mask;

if (total_size > format_limits.maxResourceSize) {
// This is only a best estimate, it is hard to accurately calculate the size when doing things like mip levels
skip |= LogWarning("WARNING-Image-InvalidFormatLimitsViolation", device, error_obj.location,
"resource size exceeds allowable maximum Image resource size = %" PRIu64
", maximum resource size = %" PRIu64 " for format %s.",
Expand Down Expand Up @@ -2336,8 +2337,9 @@ bool CoreChecks::PreCallValidateCreateImageView(VkDevice device, const VkImageVi
if (!AreFormatsSizeCompatible(view_format, image_format)) {
skip |= LogError("VUID-VkImageViewCreateInfo-image-01583", pCreateInfo->image, create_info_loc.dot(Field::image),
"was created with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT bit and "
"format (%s), but the uncompressed image view format (%s) is not size compatible.",
string_VkFormat(image_format), string_VkFormat(view_format));
"format (%s), but the uncompressed image view format (%s) is not size compatible. %s",
string_VkFormat(image_format), string_VkFormat(view_format),
DescribeFormatsSizeCompatible(image_format, view_format).c_str());
}
} else {
// both image and view are compressed format, the BLOCK_TEXEL_VIEW_COMPATIBLE is set for no reason here
Expand Down
12 changes: 6 additions & 6 deletions layers/stateless/sl_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "error_message/error_strings.h"
#include "stateless/stateless_validation.h"
#include "generated/enum_flag_bits.h"
#include "utils/vk_layer_utils.h"

bool StatelessValidation::manual_PreCallValidateCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkImage *pImage,
Expand Down Expand Up @@ -651,16 +652,15 @@ bool StatelessValidation::ValidateCreateImageFormatList(const VkImageCreateInfo
}
} else if (view_format_class != image_format_class) {
if (image_flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) {
const bool size_compatible =
!vkuFormatIsCompressed(view_format) && AreFormatsSizeCompatible(view_format, image_format);
if (!size_compatible) {
if (!AreFormatsSizeCompatible(view_format, image_format)) {
skip |= LogError("VUID-VkImageCreateInfo-pNext-06722", device, format_loc,
"(%s) and VkImageCreateInfo::format (%s) are not compatible or size-compatible.",
string_VkFormat(view_format), string_VkFormat(image_format));
"(%s) and VkImageCreateInfo::format (%s) are not class compatible or size-compatible. %s",
string_VkFormat(view_format), string_VkFormat(image_format),
DescribeFormatsSizeCompatible(view_format, image_format).c_str());
}
} else {
skip |= LogError("VUID-VkImageCreateInfo-pNext-06722", device, format_loc,
"(%s) and VkImageCreateInfo::format (%s) are not compatible.", string_VkFormat(view_format),
"(%s) and VkImageCreateInfo::format (%s) are not class compatible.", string_VkFormat(view_format),
string_VkFormat(image_format));
}
}
Expand Down
39 changes: 38 additions & 1 deletion layers/utils/vk_layer_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <string.h>
#include <sys/stat.h>
#include <vulkan/vk_enum_string_helper.h>

#include "containers/range_vector.h"
#include "vulkan/vulkan_core.h"
Expand Down Expand Up @@ -108,6 +109,12 @@ bool RangesIntersect(int64_t x, uint64_t x_size, int64_t y, uint64_t y_size) {

// Implements the vkspec.html#formats-size-compatibility section of the spec
bool AreFormatsSizeCompatible(VkFormat a, VkFormat b) {
const bool is_a_a8 = a == VK_FORMAT_A8_UNORM;
const bool is_b_a8 = b == VK_FORMAT_A8_UNORM;
if ((is_a_a8 && !is_b_a8) || (!is_a_a8 && is_b_a8)) {
return false;
}

const bool is_a_depth_stencil = vkuFormatIsDepthOrStencil(a);
const bool is_b_depth_stencil = vkuFormatIsDepthOrStencil(b);
if (is_a_depth_stencil && !is_b_depth_stencil) {
Expand All @@ -117,6 +124,36 @@ bool AreFormatsSizeCompatible(VkFormat a, VkFormat b) {
} else if (is_a_depth_stencil && is_b_depth_stencil) {
return a == b;
}
// Both non-depth/stencil

// Color formats are considered compatible if their texel block size in bytes is the same
return vkuFormatTexelBlockSize(a) == vkuFormatTexelBlockSize(b);
}

std::string DescribeFormatsSizeCompatible(VkFormat a, VkFormat b) {
std::stringstream ss;
const bool is_a_a8 = a == VK_FORMAT_A8_UNORM;
const bool is_b_a8 = b == VK_FORMAT_A8_UNORM;
if ((is_a_a8 && !is_b_a8) || (!is_a_a8 && is_b_a8)) {
ss << string_VkFormat(a) << " and " << string_VkFormat(b)
<< " either both need to be VK_FORMAT_A8_UNORM or neither of them";
return ss.str();
}

const bool is_a_depth_stencil = vkuFormatIsDepthOrStencil(a);
const bool is_b_depth_stencil = vkuFormatIsDepthOrStencil(b);
if (is_a_depth_stencil && is_b_depth_stencil) {
ss << string_VkFormat(a) << " and " << string_VkFormat(b)
<< " are both depth/stencil, therefor they must be the exact same format";
} else if (is_a_depth_stencil || is_b_depth_stencil) {
if (is_a_depth_stencil && !is_b_depth_stencil) {
ss << string_VkFormat(a) << " is a depth/stencil and " << string_VkFormat(b) << " is color";
} else if (!is_a_depth_stencil && is_b_depth_stencil) {
ss << string_VkFormat(a) << " is a color and " << string_VkFormat(b) << " is depth/stencil";
}
ss << " (this is only allowed with a certain set of formats during image copy with VK_KHR_maintenance8)";
} else {
ss << string_VkFormat(a) << " has a texel block size of " << vkuFormatTexelBlockSize(a) << " while " << string_VkFormat(b)
<< " has a texel block size of " << vkuFormatTexelBlockSize(b);
}
return ss.str();
}
1 change: 1 addition & 0 deletions layers/utils/vk_layer_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ static inline uint32_t GetTexelBufferFormatSize(VkFormat format) {
}

bool AreFormatsSizeCompatible(VkFormat a, VkFormat b);
std::string DescribeFormatsSizeCompatible(VkFormat a, VkFormat b);

static const VkShaderStageFlags kShaderStageAllGraphics =
VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT |
Expand Down
42 changes: 1 addition & 41 deletions tests/unit/copy_buffer_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ TEST_F(NegativeCopyBufferImage, ImageBufferCopyDepthStencil) {
if (missing_ds_support) {
GTEST_SKIP() << "Depth / Stencil formats unsupported";
}
// 64^2 texels, depth, 16k
vkt::Image image_16k_depth(*m_device, 64, 64, 1, VK_FORMAT_D24_UNORM_S8_UINT,
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT);
image_16k_depth.SetLayout(VK_IMAGE_LAYOUT_GENERAL);

// 256^2 texels, 512kb (256k depth, 64k stencil, 192k pack)
vkt::Image ds_image_4D_1S(
Expand Down Expand Up @@ -295,24 +291,8 @@ TEST_F(NegativeCopyBufferImage, ImageBufferCopyDepthStencil) {
ds_region.imageOffset = {0, 0, 0};
ds_region.imageExtent = {256, 256, 1};

VkMemoryBarrier mem_barrier = vku::InitStructHelper();
mem_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
mem_barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

m_command_buffer.Begin();
// Depth copies that should succeed
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_4D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_256k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_3D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_256k.handle(), 1, &ds_region);

vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_2D.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_128k.handle(), 1, &ds_region);

// Depth copies that should fail
ds_region.bufferOffset = 4;
m_errorMonitor->SetDesiredError(
"VUID-vkCmdCopyImageToBuffer-pRegions-00183"); // Extract 4b depth per texel, pack into 256k buffer
Expand All @@ -337,27 +317,11 @@ TEST_F(NegativeCopyBufferImage, ImageBufferCopyDepthStencil) {
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_2D.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_128k.handle(), 1, &ds_region);
m_errorMonitor->VerifyFound();
ds_region.imageExtent = {256, 256, 1};

// Stencil copies that should succeed
ds_region.imageExtent = {256, 256, 1};
ds_region.bufferOffset = 0;
ds_region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT;
vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_4D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_3D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);

// Stencil copies that should fail
m_errorMonitor->SetDesiredError(
"VUID-vkCmdCopyImageToBuffer-pRegions-00183"); // Extract 1b stencil per texel, pack into 64k buffer
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_4D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
Expand Down Expand Up @@ -2251,8 +2215,6 @@ TEST_F(NegativeCopyBufferImage, ImageAspectMismatch) {

// Aspect mask doesn't match source image format
m_errorMonitor->SetDesiredError("VUID-vkCmdCopyImage-aspectMask-00142");
// Again redundant but unavoidable
m_errorMonitor->SetDesiredError("VUID-vkCmdCopyImage-srcImage-01548");
vk::CmdCopyImage(m_command_buffer.handle(), color_image.handle(), VK_IMAGE_LAYOUT_GENERAL, depth_image.handle(),
VK_IMAGE_LAYOUT_GENERAL, 1, &copy_region);
m_errorMonitor->VerifyFound();
Expand All @@ -2261,8 +2223,6 @@ TEST_F(NegativeCopyBufferImage, ImageAspectMismatch) {
copy_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
copy_region.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
m_errorMonitor->SetDesiredError("VUID-vkCmdCopyImage-aspectMask-00143");
// Again redundant but unavoidable
m_errorMonitor->SetDesiredError("VUID-vkCmdCopyImage-srcImage-01548");
vk::CmdCopyImage(m_command_buffer.handle(), color_image.handle(), VK_IMAGE_LAYOUT_GENERAL, depth_image.handle(),
VK_IMAGE_LAYOUT_GENERAL, 1, &copy_region);
m_errorMonitor->VerifyFound();
Expand Down
100 changes: 100 additions & 0 deletions tests/unit/copy_buffer_image_positive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,3 +532,103 @@ TEST_F(PositiveCopyBufferImage, CopyColorToDepthMaintenacne8) {
&copy_region);
m_command_buffer.End();
}

TEST_F(PositiveCopyBufferImage, ImageBufferCopyDepthStencil) {
AddRequiredExtensions(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
RETURN_IF_SKIP(Init());

// Verify all needed Depth/Stencil formats are supported
bool missing_ds_support = false;
VkFormatProperties props = {0, 0, 0};
vk::GetPhysicalDeviceFormatProperties(m_device->Physical().handle(), VK_FORMAT_D32_SFLOAT_S8_UINT, &props);
missing_ds_support |= (props.bufferFeatures == 0 && props.linearTilingFeatures == 0 && props.optimalTilingFeatures == 0);
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) == 0;
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_DST_BIT) == 0;
vk::GetPhysicalDeviceFormatProperties(m_device->Physical().handle(), VK_FORMAT_D24_UNORM_S8_UINT, &props);
missing_ds_support |= (props.bufferFeatures == 0 && props.linearTilingFeatures == 0 && props.optimalTilingFeatures == 0);
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) == 0;
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_DST_BIT) == 0;
vk::GetPhysicalDeviceFormatProperties(m_device->Physical().handle(), VK_FORMAT_D16_UNORM, &props);
missing_ds_support |= (props.bufferFeatures == 0 && props.linearTilingFeatures == 0 && props.optimalTilingFeatures == 0);
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) == 0;
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_DST_BIT) == 0;
vk::GetPhysicalDeviceFormatProperties(m_device->Physical().handle(), VK_FORMAT_S8_UINT, &props);
missing_ds_support |= (props.bufferFeatures == 0 && props.linearTilingFeatures == 0 && props.optimalTilingFeatures == 0);
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) == 0;
missing_ds_support |= (props.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_DST_BIT) == 0;

if (missing_ds_support) {
GTEST_SKIP() << "Depth / Stencil formats unsupported";
}

// 256^2 texels, 512kb (256k depth, 64k stencil, 192k pack)
vkt::Image ds_image_4D_1S(
*m_device, 256, 256, 1, VK_FORMAT_D32_SFLOAT_S8_UINT,
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
ds_image_4D_1S.SetLayout(VK_IMAGE_LAYOUT_GENERAL);

// 256^2 texels, 256kb (192k depth, 64k stencil)
vkt::Image ds_image_3D_1S(
*m_device, 256, 256, 1, VK_FORMAT_D24_UNORM_S8_UINT,
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
ds_image_3D_1S.SetLayout(VK_IMAGE_LAYOUT_GENERAL);

// 256^2 texels, 128k (128k depth)
vkt::Image ds_image_2D(
*m_device, 256, 256, 1, VK_FORMAT_D16_UNORM,
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
ds_image_2D.SetLayout(VK_IMAGE_LAYOUT_GENERAL);

// 256^2 texels, 64k (64k stencil)
vkt::Image ds_image_1S(
*m_device, 256, 256, 1, VK_FORMAT_S8_UINT,
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
ds_image_1S.SetLayout(VK_IMAGE_LAYOUT_GENERAL);

VkBufferUsageFlags transfer_usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
vkt::Buffer buffer_256k(*m_device, 262144, transfer_usage); // 256k
vkt::Buffer buffer_128k(*m_device, 131072, transfer_usage); // 128k
vkt::Buffer buffer_64k(*m_device, 65536, transfer_usage); // 64k

VkBufferImageCopy ds_region = {};
ds_region.bufferOffset = 0;
ds_region.bufferRowLength = 0;
ds_region.bufferImageHeight = 0;
ds_region.imageSubresource = {VK_IMAGE_ASPECT_DEPTH_BIT, 0, 0, 1};
ds_region.imageOffset = {0, 0, 0};
ds_region.imageExtent = {256, 256, 1};

VkMemoryBarrier mem_barrier = vku::InitStructHelper();
mem_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
mem_barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

m_command_buffer.Begin();
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_4D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_256k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_3D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_256k.handle(), 1, &ds_region);

vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_2D.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_128k.handle(), 1, &ds_region);

// Stencil
ds_region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT;

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_4D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_3D_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);

vk::CmdPipelineBarrier(m_command_buffer.handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1,
&mem_barrier, 0, nullptr, 0, nullptr);
vk::CmdCopyImageToBuffer(m_command_buffer.handle(), ds_image_1S.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
buffer_64k.handle(), 1, &ds_region);
}
Loading

0 comments on commit 7f8007a

Please sign in to comment.