Lines Matching defs:format
72 // D3D allows us to copy within the same format family but doesn't do conversions
89 // Surfaces must have the same format.
91 // typeless formats. It's not possible to resolve within the same format family otherwise.
267 bool stencil_format_supported(ID3D12Device* device, DXGI_FORMAT format) {
269 formatSupportDesc.Format = format;
336 const GrD3DCaps::FormatInfo& GrD3DCaps::getFormatInfo(DXGI_FORMAT format) const {
338 return nonConstThis->getFormatInfo(format);
341 GrD3DCaps::FormatInfo& GrD3DCaps::getFormatInfo(DXGI_FORMAT format) {
345 if (kDxgiFormats[i] == format) {
362 constexpr DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM;
363 auto& info = this->getFormatInfo(format);
364 info.init(adapterDesc, device, format);
390 constexpr DXGI_FORMAT format = DXGI_FORMAT_R8_UNORM;
391 auto& info = this->getFormatInfo(format);
392 info.init(adapterDesc, device, format);
419 constexpr DXGI_FORMAT format = DXGI_FORMAT_B8G8R8A8_UNORM;
420 auto& info = this->getFormatInfo(format);
421 info.init(adapterDesc, device, format);
438 constexpr DXGI_FORMAT format = DXGI_FORMAT_B5G6R5_UNORM;
439 auto& info = this->getFormatInfo(format);
440 info.init(adapterDesc, device, format);
457 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16G16B16A16_FLOAT;
458 auto& info = this->getFormatInfo(format);
459 info.init(adapterDesc, device, format);
483 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16_FLOAT;
484 auto& info = this->getFormatInfo(format);
485 info.init(adapterDesc, device, format);
504 constexpr DXGI_FORMAT format = DXGI_FORMAT_R8G8_UNORM;
505 auto& info = this->getFormatInfo(format);
506 info.init(adapterDesc, device, format);
523 constexpr DXGI_FORMAT format = DXGI_FORMAT_R10G10B10A2_UNORM;
524 auto& info = this->getFormatInfo(format);
525 info.init(adapterDesc, device, format);
542 constexpr DXGI_FORMAT format = DXGI_FORMAT_B4G4R4A4_UNORM;
543 auto& info = this->getFormatInfo(format);
544 info.init(adapterDesc, device, format);
563 constexpr DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
564 auto& info = this->getFormatInfo(format);
565 info.init(adapterDesc, device, format);
582 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16_UNORM;
583 auto& info = this->getFormatInfo(format);
584 info.init(adapterDesc, device, format);
603 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16G16_UNORM;
604 auto& info = this->getFormatInfo(format);
605 info.init(adapterDesc, device, format);
622 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16G16B16A16_UNORM;
623 auto& info = this->getFormatInfo(format);
624 info.init(adapterDesc, device, format);
641 constexpr DXGI_FORMAT format = DXGI_FORMAT_R16G16_FLOAT;
642 auto& info = this->getFormatInfo(format);
643 info.init(adapterDesc, device, format);
661 constexpr DXGI_FORMAT format = DXGI_FORMAT_BC1_UNORM;
662 auto& info = this->getFormatInfo(format);
663 info.init(adapterDesc, device, format);
670 // format we use for a given GrcolorType.
716 static bool multisample_count_supported(ID3D12Device* device, DXGI_FORMAT format, int sampleCount) {
718 msqLevels.Format = format;
728 ID3D12Device* device, DXGI_FORMAT format) {
729 if (multisample_count_supported(device, format, 1)) {
741 if (multisample_count_supported(device, format, 2)) {
744 if (multisample_count_supported(device, format, 4)) {
747 if (multisample_count_supported(device, format, 8)) {
750 if (multisample_count_supported(device, format, 16)) {
758 DXGI_FORMAT format) {
760 formatSupportDesc.Format = format;
767 this->initSampleCounts(adapterDesc, device, format);
771 bool GrD3DCaps::isFormatSRGB(const GrBackendFormat& format) const {
773 if (!format.asDxgiFormat(&dxgiFormat)) {
785 bool GrD3DCaps::isFormatTexturable(const GrBackendFormat& format, GrTextureType) const {
787 if (!format.asDxgiFormat(&dxgiFormat)) {
794 bool GrD3DCaps::isFormatTexturable(DXGI_FORMAT format) const {
795 const FormatInfo& info = this->getFormatInfo(format);
799 bool GrD3DCaps::isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat& format,
802 if (!format.asDxgiFormat(&dxgiFormat)) {
815 bool GrD3DCaps::isFormatRenderable(const GrBackendFormat& format, int sampleCount) const {
817 if (!format.asDxgiFormat(&dxgiFormat)) {
823 bool GrD3DCaps::isFormatRenderable(DXGI_FORMAT format, int sampleCount) const {
824 return sampleCount <= this->maxRenderTargetSampleCount(format);
827 bool GrD3DCaps::isFormatUnorderedAccessible(DXGI_FORMAT format) const {
828 const FormatInfo& info = this->getFormatInfo(format);
833 const GrBackendFormat& format) const {
835 if (!format.asDxgiFormat(&dxgiFormat)) {
842 int GrD3DCaps::getRenderTargetSampleCount(int requestedCount, DXGI_FORMAT format) const {
845 const FormatInfo& info = this->getFormatInfo(format);
866 int GrD3DCaps::maxRenderTargetSampleCount(const GrBackendFormat& format) const {
868 if (!format.asDxgiFormat(&dxgiFormat)) {
874 int GrD3DCaps::maxRenderTargetSampleCount(DXGI_FORMAT format) const {
875 const FormatInfo& info = this->getFormatInfo(format);
884 GrColorType GrD3DCaps::getFormatColorType(DXGI_FORMAT format) const {
885 const FormatInfo& info = this->getFormatInfo(format);
917 // We can't directly read from a compressed format
939 const GrBackendFormat& format) const {
941 if (!format.asDxgiFormat(&dxgiFormat)) {
955 DXGI_FORMAT format = this->getFormatFromColorType(ct);
956 if (format == DXGI_FORMAT_UNKNOWN) {
959 return GrBackendFormat::MakeDxgi(format);
977 GrSwizzle GrD3DCaps::onGetReadSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
979 SkAssertResult(format.asDxgiFormat(&dxgiFormat));
987 SkDEBUGFAILF("Illegal color type (%d) and format (%d) combination.",
992 GrSwizzle GrD3DCaps::getWriteSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
994 SkAssertResult(format.asDxgiFormat(&dxgiFormat));
1002 SkDEBUGFAILF("Illegal color type (%d) and format (%d) combination.",
1007 uint64_t GrD3DCaps::computeFormatKey(const GrBackendFormat& format) const {
1009 SkAssertResult(format.asDxgiFormat(&dxgiFormat));
1043 const GrBackendFormat& format) const {