Flutter Engine
The Flutter Engine
Classes | Functions
GrD3DResourceProvider.cpp File Reference
#include "src/gpu/ganesh/d3d/GrD3DResourceProvider.h"
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/GrDirectContext.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/d3d/GrD3DBuffer.h"
#include "src/gpu/ganesh/d3d/GrD3DCommandList.h"
#include "src/gpu/ganesh/d3d/GrD3DGpu.h"
#include "src/gpu/ganesh/d3d/GrD3DPipelineState.h"
#include "src/gpu/ganesh/d3d/GrD3DPipelineStateBuilder.h"
#include "src/gpu/ganesh/d3d/GrD3DRenderTarget.h"

Go to the source code of this file.

Classes

struct  GrD3DResourceProvider::PipelineStateCache::Entry
 

Functions

static D3D12_TEXTURE_ADDRESS_MODE wrap_mode_to_d3d_address_mode (GrSamplerState::WrapMode wrapMode)
 
static D3D12_FILTER d3d_filter (GrSamplerState sampler)
 

Function Documentation

◆ d3d_filter()

static D3D12_FILTER d3d_filter ( GrSamplerState  sampler)
static

Definition at line 137 of file GrD3DResourceProvider.cpp.

137 {
138 if (sampler.isAniso()) {
139 return D3D12_FILTER_ANISOTROPIC;
140 }
141 switch (sampler.mipmapMode()) {
142 // When the mode is kNone we disable filtering using maxLOD.
145 switch (sampler.filter()) {
146 case GrSamplerState::Filter::kNearest: return D3D12_FILTER_MIN_MAG_MIP_POINT;
147 case GrSamplerState::Filter::kLinear: return D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT;
148 }
151 switch (sampler.filter()) {
152 case GrSamplerState::Filter::kNearest: return D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR;
153 case GrSamplerState::Filter::kLinear: return D3D12_FILTER_MIN_MAG_MIP_LINEAR;
154 }
156 }
158}
#define SkUNREACHABLE
Definition: SkAssert.h:135
bool isAniso() const
constexpr Filter filter() const
constexpr MipmapMode mipmapMode() const

◆ wrap_mode_to_d3d_address_mode()

static D3D12_TEXTURE_ADDRESS_MODE wrap_mode_to_d3d_address_mode ( GrSamplerState::WrapMode  wrapMode)
static

Definition at line 123 of file GrD3DResourceProvider.cpp.

123 {
124 switch (wrapMode) {
126 return D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
128 return D3D12_TEXTURE_ADDRESS_MODE_WRAP;
130 return D3D12_TEXTURE_ADDRESS_MODE_MIRROR;
132 return D3D12_TEXTURE_ADDRESS_MODE_BORDER;
133 }
134 SK_ABORT("Unknown wrap mode.");
135}
#define SK_ABORT(message,...)
Definition: SkAssert.h:70