| 411 | } |
| 412 | |
| 413 | IndexType 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 | |
| 420 | void ImageRangeEncoder::Decode(const VkImageSubresource& subres, const IndexType& encode, uint32_t& out_layer, |
| 421 | VkOffset3D& out_offset) const { |
no outgoing calls
no test coverage detected