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

Method Get

layers/state_tracker/subresource_adapter.cpp:895–928  ·  view source on GitHub ↗

Create the encoder parameter suitable to the full range aspect mask (*must* be canonical)

Source from the content-addressed store, hash-verified

893
894// Create the encoder parameter suitable to the full range aspect mask (*must* be canonical)
895const AspectParameters* AspectParameters::Get(VkImageAspectFlags aspect_mask) {
896 // We need a persitent instance of each specialist containing only a VTABLE each
897 static const AspectParametersImpl<ColorAspectTraits> k_color_param;
898 static const AspectParametersImpl<DepthAspectTraits> k_depth_param;
899 static const AspectParametersImpl<StencilAspectTraits> k_stencil_param;
900 static const AspectParametersImpl<DepthStencilAspectTraits> k_depth_stencil_param;
901 static const AspectParametersImpl<Multiplane2AspectTraits> k_mutliplane2_param;
902 static const AspectParametersImpl<Multiplane3AspectTraits> k_mutliplane3_param;
903
904 const AspectParameters* param = nullptr;
905 switch (aspect_mask) {
906 case ColorAspectTraits::kAspectMask:
907 param = &k_color_param;
908 break;
909 case DepthAspectTraits::kAspectMask:
910 param = &k_depth_param;
911 break;
912 case StencilAspectTraits::kAspectMask:
913 param = &k_stencil_param;
914 break;
915 case DepthStencilAspectTraits::kAspectMask:
916 param = &k_depth_stencil_param;
917 break;
918 case Multiplane2AspectTraits::kAspectMask:
919 param = &k_mutliplane2_param;
920 break;
921 case Multiplane3AspectTraits::kAspectMask:
922 param = &k_mutliplane3_param;
923 break;
924 default:
925 assert(false);
926 }
927 return param;
928}
929
930inline ImageRangeEncoder::SubresInfo::SubresInfo(const VkSubresourceLayout& layout_, const VkExtent3D& extent_,
931 const VkExtent3D& texel_extent, double texel_size)

Callers 10

RecordExecuteCommandsMethod · 0.45
PreSubmitMethod · 0.45
PostSubmitMethod · 0.45
RetireMethod · 0.45
ImageMethod · 0.45
BufferMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected