#include <cassert>
#include <vulkan/utility/vk_format_utils.h>
#include "subresource_adapter.h"
#include <cmath>
#include "state_tracker/image_state.h"
#include "generated/layer_chassis_dispatch.h"
namespace subresource_adapter {
Subresource::Subresource(const RangeEncoder& encoder, const VkImageSubresource& subres)
: … { … }
IndexType RangeEncoder::Encode1AspectArrayOnly(const Subresource& pos) const { … }
IndexType RangeEncoder::Encode1AspectMipArray(const Subresource& pos) const { … }
IndexType RangeEncoder::Encode1AspectMipOnly(const Subresource& pos) const { … }
IndexType RangeEncoder::EncodeAspectArrayOnly(const Subresource& pos) const { … }
IndexType RangeEncoder::EncodeAspectMipArray(const Subresource& pos) const { … }
IndexType RangeEncoder::EncodeAspectMipOnly(const Subresource& pos) const { … }
uint32_t RangeEncoder::LowerBoundImpl1(VkImageAspectFlags aspect_mask) const { … }
uint32_t RangeEncoder::LowerBoundWithStartImpl1(VkImageAspectFlags aspect_mask, uint32_t start) const { … }
uint32_t RangeEncoder::LowerBoundImpl2(VkImageAspectFlags aspect_mask) const { … }
uint32_t RangeEncoder::LowerBoundWithStartImpl2(VkImageAspectFlags aspect_mask, uint32_t start) const { … }
uint32_t RangeEncoder::LowerBoundImpl3(VkImageAspectFlags aspect_mask) const { … }
uint32_t RangeEncoder::LowerBoundWithStartImpl3(VkImageAspectFlags aspect_mask, uint32_t start) const { … }
void RangeEncoder::PopulateFunctionPointers() { … }
RangeEncoder::RangeEncoder(const VkImageSubresourceRange& full_range, const AspectParameters* param)
: … { … }
#ifndef NDEBUG
static bool IsValid(const RangeEncoder& encoder, const VkImageSubresourceRange& bounds) { … }
#endif
RangeGenerator::RangeGenerator(const RangeEncoder& encoder, const VkImageSubresourceRange& subres_range)
: … { … }
RangeGenerator& RangeGenerator::operator++() { … }
ImageRangeEncoder::ImageRangeEncoder(const vvl::Image& image)
: … { … }
ImageRangeEncoder::ImageRangeEncoder(const vvl::Image& image, const AspectParameters* param)
: … { … }
IndexType ImageRangeEncoder::Encode2D(const VkSubresourceLayout& layout, uint32_t layer, uint32_t aspect_index,
const VkOffset3D& offset) const { … }
IndexType ImageRangeEncoder::Encode3D(const VkSubresourceLayout& layout, uint32_t aspect_index, const VkOffset3D& offset) const { … }
void ImageRangeEncoder::Decode(const VkImageSubresource& subres, const IndexType& encode, uint32_t& out_layer,
VkOffset3D& out_offset) const { … }
inline VkImageSubresourceRange GetRemaining(const VkImageSubresourceRange& full_range, VkImageSubresourceRange subres_range) { … }
inline bool CoversAllLayers(const VkImageSubresourceRange& full_range, VkImageSubresourceRange subres_range) { … }
static bool SubresourceRangeIsEmpty(const VkImageSubresourceRange& range) { … }
static bool ExtentIsEmpty(const VkExtent3D& extent) { … }
VkOffset3D ImageRangeGenerator::GetOffset(uint32_t aspect_index) const { … }
VkExtent3D ImageRangeGenerator::GetExtent(uint32_t aspect_index) const { … }
void ImageRangeGenerator::SetInitialPosFullOffset(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosFullWidth(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosFullHeight(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosSomeDepth(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosFullDepth(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosSomeLayers(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosAllLayers(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosOneAspect(uint32_t layer, uint32_t aspect_index) { … }
void ImageRangeGenerator::SetInitialPosAllSubres(uint32_t layer, uint32_t aspect_index) { … }
bool ImageRangeGenerator::Convert2DCompatibleTo3D() { … }
ImageRangeGenerator::ImageRangeGenerator(const ImageRangeEncoder& encoder, const VkImageSubresourceRange& subres_range,
VkDeviceSize base_address, bool is_depth_sliced)
: … { … }
ImageRangeGenerator::ImageRangeGenerator(const ImageRangeEncoder& encoder, const VkImageSubresourceRange& subres_range,
const VkOffset3D& offset, const VkExtent3D& extent, VkDeviceSize base_address,
bool is_depth_sliced)
: … { … }
void ImageRangeGenerator::SetUpSubresInfo() { … }
void ImageRangeGenerator::SetUpIncrementerDefaults() { … }
void ImageRangeGenerator::SetUpSubresIncrementer() { … }
void ImageRangeGenerator::SetUpIncrementer(bool all_width, bool all_height, bool all_depth) { … }
ImageRangeGenerator& ImageRangeGenerator::operator++() { … }
template <typename AspectTraits>
class AspectParametersImpl : public AspectParameters { … };
struct ColorAspectTraits { … };
struct DepthAspectTraits { … };
struct StencilAspectTraits { … };
struct DepthStencilAspectTraits { … };
struct Multiplane2AspectTraits { … };
struct Multiplane3AspectTraits { … };
const AspectParameters* AspectParameters::Get(VkImageAspectFlags aspect_mask) { … }
inline ImageRangeEncoder::SubresInfo::SubresInfo(const VkSubresourceLayout& layout_, const VkExtent3D& extent_,
const VkExtent3D& texel_extent, double texel_size)
: … { … }
ImageRangeEncoder::SubresInfo::SubresInfo(const SubresInfo&rhs)
: … { … }
void ImageRangeGenerator::IncrementerState::Set(uint32_t y_count_, uint32_t layer_z_count_, IndexType base, IndexType span,
IndexType y_step, IndexType z_step) { … }
}