Flutter Engine
 
Loading...
Searching...
No Matches
impeller::SamplerDescriptor Struct Referencefinal

#include <sampler_descriptor.h>

Public Member Functions

 SamplerDescriptor ()
 
 SamplerDescriptor (std::string_view label, MinMagFilter min_filter, MinMagFilter mag_filter, MipFilter mip_filter)
 

Static Public Member Functions

static uint64_t ToKey (const SamplerDescriptor &d)
 

Public Attributes

MinMagFilter min_filter = MinMagFilter::kNearest
 
MinMagFilter mag_filter = MinMagFilter::kNearest
 
MipFilter mip_filter = MipFilter::kNearest
 
SamplerAddressMode width_address_mode = SamplerAddressMode::kClampToEdge
 
SamplerAddressMode height_address_mode = SamplerAddressMode::kClampToEdge
 
SamplerAddressMode depth_address_mode = SamplerAddressMode::kClampToEdge
 
std::string_view label = "NN Clamp Sampler"
 

Detailed Description

Definition at line 14 of file sampler_descriptor.h.

Constructor & Destructor Documentation

◆ SamplerDescriptor() [1/2]

impeller::SamplerDescriptor::SamplerDescriptor ( )
default

◆ SamplerDescriptor() [2/2]

impeller::SamplerDescriptor::SamplerDescriptor ( std::string_view  label,
MinMagFilter  min_filter,
MinMagFilter  mag_filter,
MipFilter  mip_filter 
)

Member Function Documentation

◆ ToKey()

static uint64_t impeller::SamplerDescriptor::ToKey ( const SamplerDescriptor d)
inlinestatic

Definition at line 32 of file sampler_descriptor.h.

32 {
33 static_assert(sizeof(MinMagFilter) == 1);
34 static_assert(sizeof(MipFilter) == 1);
35 static_assert(sizeof(SamplerAddressMode) == 1);
36
37 return static_cast<uint64_t>(d.min_filter) << 0 |
38 static_cast<uint64_t>(d.mag_filter) << 8 |
39 static_cast<uint64_t>(d.mip_filter) << 16 |
40 static_cast<uint64_t>(d.width_address_mode) << 24 |
41 static_cast<uint64_t>(d.height_address_mode) << 32 |
42 static_cast<uint64_t>(d.depth_address_mode) << 40;
43 }
auto & d
Definition main.cc:28
SamplerAddressMode
Definition formats.h:441
MipFilter
Options for selecting and filtering between mipmap levels.
Definition formats.h:425
MinMagFilter
Describes how the texture should be sampled when the texture is being shrunk (minified) or expanded (...
Definition formats.h:415

References d.

Referenced by impeller::ImmutableSamplerKeyVK::GetHash(), and impeller::ImmutableSamplerKeyVK::IsEqual().

Member Data Documentation

◆ depth_address_mode

SamplerAddressMode impeller::SamplerDescriptor::depth_address_mode = SamplerAddressMode::kClampToEdge

Definition at line 21 of file sampler_descriptor.h.

Referenced by impeller::CreateSampler().

◆ height_address_mode

◆ label

std::string_view impeller::SamplerDescriptor::label = "NN Clamp Sampler"

◆ mag_filter

◆ min_filter

◆ mip_filter

◆ width_address_mode


The documentation for this struct was generated from the following files: