Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
GrD3DCaps.cpp File Reference
#include "src/gpu/ganesh/d3d/GrD3DCaps.h"
#include "include/core/SkTextureCompressionType.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/d3d/GrD3DBackendContext.h"
#include "include/gpu/d3d/GrD3DTypes.h"
#include "src/core/SkCompressedDataUtils.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/ganesh/GrBackendUtils.h"
#include "src/gpu/ganesh/GrProgramDesc.h"
#include "src/gpu/ganesh/GrProgramInfo.h"
#include "src/gpu/ganesh/GrRenderTargetProxy.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/GrStencilSettings.h"
#include "src/gpu/ganesh/TestFormatColorTypeCombination.h"
#include "src/gpu/ganesh/d3d/GrD3DGpu.h"
#include "src/gpu/ganesh/d3d/GrD3DRenderTarget.h"
#include "src/gpu/ganesh/d3d/GrD3DTexture.h"
#include "src/gpu/ganesh/d3d/GrD3DUtil.h"

Go to the source code of this file.

Functions

bool stencil_format_supported (ID3D12Device *device, DXGI_FORMAT format)
 
static bool multisample_count_supported (ID3D12Device *device, DXGI_FORMAT format, int sampleCount)
 

Variables

static constexpr DXGI_FORMAT kDxgiFormats []
 

Function Documentation

◆ multisample_count_supported()

static bool multisample_count_supported ( ID3D12Device *  device,
DXGI_FORMAT  format,
int  sampleCount 
)
static

Definition at line 731 of file GrD3DCaps.cpp.

731 {
732 D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS msqLevels;
733 msqLevels.Format = format;
734 msqLevels.SampleCount = sampleCount;
735 msqLevels.Flags = D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE;
736 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS,
737 &msqLevels, sizeof(msqLevels)));
738
739 return msqLevels.NumQualityLevels > 0;
740}
#define GR_D3D_CALL_ERRCHECK(X)
Definition GrD3DUtil.h:16
VkDevice device
Definition main.cc:53
uint32_t uint32_t * format

◆ stencil_format_supported()

bool stencil_format_supported ( ID3D12Device *  device,
DXGI_FORMAT  format 
)

Definition at line 275 of file GrD3DCaps.cpp.

275 {
276 D3D12_FEATURE_DATA_FORMAT_SUPPORT formatSupportDesc;
277 formatSupportDesc.Format = format;
278 GR_D3D_CALL_ERRCHECK(device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT,
279 &formatSupportDesc,
280 sizeof(formatSupportDesc)));
281 return SkToBool(D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL & formatSupportDesc.Support1);
282}
static constexpr bool SkToBool(const T &x)
Definition SkTo.h:35

Variable Documentation

◆ kDxgiFormats

constexpr DXGI_FORMAT kDxgiFormats[]
staticconstexpr
Initial value:
= {
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
DXGI_FORMAT_B5G6R5_UNORM,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16_FLOAT,
DXGI_FORMAT_R8G8_UNORM,
DXGI_FORMAT_R10G10B10A2_UNORM,
DXGI_FORMAT_B4G4R4A4_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
DXGI_FORMAT_BC1_UNORM,
DXGI_FORMAT_R16_UNORM,
DXGI_FORMAT_R16G16_UNORM,
DXGI_FORMAT_R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16_FLOAT
}

Definition at line 295 of file GrD3DCaps.cpp.

295 {
296 DXGI_FORMAT_R8G8B8A8_UNORM,
297 DXGI_FORMAT_R8_UNORM,
298 DXGI_FORMAT_B8G8R8A8_UNORM,
299 DXGI_FORMAT_B5G6R5_UNORM,
300 DXGI_FORMAT_R16G16B16A16_FLOAT,
301 DXGI_FORMAT_R16_FLOAT,
302 DXGI_FORMAT_R8G8_UNORM,
303 DXGI_FORMAT_R10G10B10A2_UNORM,
304 DXGI_FORMAT_B4G4R4A4_UNORM,
305 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
306 DXGI_FORMAT_BC1_UNORM,
307 DXGI_FORMAT_R16_UNORM,
308 DXGI_FORMAT_R16G16_UNORM,
309 DXGI_FORMAT_R16G16B16A16_UNORM,
310 DXGI_FORMAT_R16G16_FLOAT
311};