MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / Encode3D

Method Encode3D

layers/state_tracker/subresource_adapter.cpp:413–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413IndexType ImageRangeEncoder::Encode3D(const VkSubresourceLayout& layout, uint32_t aspect_index, const VkOffset3D& offset) const {
414 // See comment in Encode2D.
415 double xSize = static_cast<double>(texel_block_extent_.height * texel_sizes_[aspect_index]);
416 return layout.offset + offset.z * layout.depthPitch + offset.y * layout.rowPitch +
417 (offset.x ? static_cast<IndexType>(floor(offset.x * xSize)) : 0U);
418}
419
420void ImageRangeEncoder::Decode(const VkImageSubresource& subres, const IndexType& encode, uint32_t& out_layer,
421 VkOffset3D& out_offset) const {

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected