Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: formats-tier-1 extension #3837

Open
teoxoy opened this issue Feb 17, 2023 · 6 comments
Open

Proposal: formats-tier-1 extension #3837

teoxoy opened this issue Feb 17, 2023 · 6 comments

Comments

@teoxoy
Copy link
Member

teoxoy commented Feb 17, 2023

Extension name subject to bikeshedding. The idea behind the name is that we'll have more tiers in the future for future formats/capabilities.

This extension will enable the following:

  • RENDER_ATTACHMENT, blending, multisampling, resolve for:

    • r8snorm
    • rg8snorm
    • rgba8snorm
    • rg11b10ufloat (this extension obsoletes the "rg11b10ufloat-renderable" extension)

    Metal: Available
    D3D FL11: Available
    Vulkan: Needs COLOR_ATTACHMENT & COLOR_ATTACHMENT_BLEND (loses all Adreno 5XX devices)

  • STORAGE_BINDING for:

    • r8unorm
    • r8snorm
    • r8uint
    • r8sint
    • rg8unorm
    • rg8snorm
    • rg8uint
    • rg8sint
    • r16uint
    • r16sint
    • r16float
    • rg16uint
    • rg16sint
    • rg16float
    • rgb10a2unorm
    • rgb10a2uint (if it lands in v1)
    • rg11b10ufloat

    Metal: Available
    D3D FL11: Available
    Vulkan: Needs shaderStorageImageExtendedFormats (loses all Adreno 5XX devices)

  • 16bit normalized formats (with "unfilterable-float" sample type, RENDER_ATTACHMENT, blending, multisampling, STORAGE_BINDING):

    • r16unorm
    • r16snorm
    • rg16unorm
    • rg16snorm
    • rgba16unorm
    • rgba16snorm

    Metal: Available
    D3D FL11: Available
    Vulkan: Needs COLOR_ATTACHMENT & COLOR_ATTACHMENT_BLEND & SAMPLED_IMAGE (loses all Adreno 5XX devices)
    + shaderStorageImageExtendedFormats (loses all Adreno 5XX devices)


As seen above, all Vulkan requirements lose all Adreno 5XX devices and we can bundle all these formats and capabilities together.

The info on all lost devices can be gathered like so (see folded region)

Append the following requirements here and run the script.

renderable_required_flags = vk.FormatFeature.COLOR_ATTACHMENT | vk.FormatFeature.COLOR_ATTACHMENT_BLEND
add_rq('r8snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R8_SNORM, renderable_required_flags))
add_rq('rg8snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R8G8_SNORM, renderable_required_flags))
add_rq('rgba8snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R8G8B8A8_SNORM, renderable_required_flags))
add_rq('rg11b10ufloat', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.B10G11R11_UFLOAT_PACK32, renderable_required_flags))
add_rq('shaderStorageImageExtendedFormats',
        lambda info: 'shaderStorageImageExtendedFormats' in info.features)

renderable_required_flags2 = vk.FormatFeature.COLOR_ATTACHMENT | vk.FormatFeature.COLOR_ATTACHMENT_BLEND | vk.FormatFeature.SAMPLED_IMAGE
add_rq('r16unorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16_UNORM, renderable_required_flags2))
add_rq('r16snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16_SNORM, renderable_required_flags2))
add_rq('rg16unorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16G16_UNORM, renderable_required_flags2))
add_rq('rg16snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16G16_SNORM, renderable_required_flags2))
add_rq('rgba16unorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16G16B16A16_UNORM, renderable_required_flags2))
add_rq('rgba16snorm', lambda info: format_supported_with_optimal_tiling_features(
    info.fmts, vk.Format.R16G16B16A16_SNORM, renderable_required_flags2))

Results:

Requirement "r8snorm" loses 12 (and partially loses 3) further deviceNames:
  In ALL reports (12 deviceNames):
    x Adreno (TM) 504: 7 (8629 9137 10642 11160 11664 12378 15689)
    x Adreno (TM) 505: 28 (4259 4457 4489 4824 6129 7394 7550 8516 8922 9025 9063 9355 9501 9798 10174 10776 11057 11789 12203 12269 12277 12342 13211 14230 14771 14913 16201 16983)
    x Adreno (TM) 506: 55 (3851 4541 4680 4724 4916 4956 5006 5250 5990 6044 6058 6151 6814 7023 7137 7612 8841 9054 9060 9935 10294 10314 10414 10431 10513 10542 10810 10941 10997 11017 11346 11423 11493 11526 11656 12201 12360 12454 12578 12618 12636 12785 12953 13423 13426 13508 13618 14282 15407 15552 15746 16302 16685 16691 17097)
    x Adreno (TM) 508: 9 (4452 6680 8652 10383 10442 10589 12379 13414 14872)
    x Adreno (TM) 509: 16 (4924 6120 8358 9062 9064 11486 11487 11488 11673 11820 12108 12678 13230 14911 15616 15895)
    x Adreno (TM) 510: 1 (6786)
    x Adreno (TM) 512: 47 (3724 4394 4400 4683 4768 5679 6063 6787 7385 8566 8697 10195 10204 10546 10608 10638 10656 10700 10775 11177 11237 11326 11399 11452 11475 11605 11663 11933 12813 13364 13421 13578 13616 13837 14233 14625 14716 14916 15742 16129 16187 16454 16516 16791 16933 16960 17204)
    x Adreno (TM) 530: 53 (3183 3597 3603 3765 3907 4359 4363 4773 4999 5019 5103 5210 5314 5399 5402 6072 6100 6215 6285 6560 6841 6885 7313 7542 7601 8268 8483 8544 9061 9332 10486 10681 10827 10838 10958 11034 11724 11874 12263 13278 13802 13934 13964 14311 14312 14364 14491 15081 15956 16195 16871 16931 16986)
    x Adreno (TM) 540: 79 (3422 3450 3532 3571 4071 4145 4433 4503 5102 5150 5215 5259 5383 5632 5811 5866 6046 6068 6083 6163 6208 6405 6796 7584 8603 8977 9008 9251 9354 9705 10284 10347 10597 10728 10752 10784 10786 10819 10844 10908 11101 11225 11338 11350 11485 11498 11665 11669 12292 12489 13097 13246 13294 13482 13577 13751 14142 14175 14369 14844 15188 15241 15257 15357 15391 15397 15526 15536 15628 15705 16055 16117 16223 16279 16285 16468 16977 17051 17304)
    x SwiftShader Device: 3 (14246 16262 16766)
    x Virtio-GPU Venus (llvmpipe): 2 (14801 14867)
    x llvmpipe: 161 (13810 13838 13864 14050 14115 14236 14338 14348 14516 14538 14542 14556 14567 14570 14571 14633 14657 14683 14695 14707 14721 14727 14734 14737 14750 14785 14797 14810 14821 14843 14847 14870 14886 14889 14902 14909 14919 14951 14971 14975 15011 15014 15027 15046 15058 15071 15088 15092 15098 15121 15136 15195 15215 15227 15239 15249 15276 15279 15285 15309 15431 15488 15489 15568 15639 15695 15799 15809 15811 15847 15922 15974 15990 16022 16041 16044 16064 16068 16069 16103 16116 16119 16139 16149 16173 16180 16192 16216 16240 16244 16250 16268 16272 16277 16299 16337 16340 16349 16370 16374 16384 16395 16420 16423 16457 16467 16472 16481 16486 16495 16502 16504 16519 16525 16534 16554 16561 16572 16581 16598 16627 16643 16673 16678 16699 16702 16725 16780 16798 16816 16838 16852 16866 16878 16892 16909 16939 16964 16975 17020 17041 17054 17059 17069 17075 17103 17124 17162 17185 17197 17215 17243 17257 17269 17301 17353 17378 17394 17424 17445 17483)
  In SOME reports (3 deviceNames):
    ~ Adreno (TM) 615: 3 of 15 (5944 6088 7898; ok: 6436 7927 8903 9147 9184 9422 10427 11275 12085 12583 12996 13171)
    ~ Adreno (TM) 616: 5 of 17 (4986 5287 6492 9756 11712; ok: 7806 10393 10604 11072 12858 13327 13564 14753 14828 15544 15614 15887)
    ~ Adreno (TM) 630: 49 of 123 (2801 3024 3138 3305 3442 3665 3687 3754 3755 3795 3810 3927 4134 4140 4249 4270 4366 4403 4413 4486 4525 4563 4599 4628 4632 4915 4926 5175 5253 5800 6032 6038 6056 6107 6162 6234 6266 6704 6996 7057 8585 8951 10285 11026 12775 13424 13749 13963 16888; ok: 5886 6434 6788 6987 7108 7374 7949 8473 8577 8907 9097 9267 9471 10287 10291 10300 10302 10303 10351 10371 10424 10460 10551 10672 10678 10730 10770 10813 10966 11016 11035 11120 11464 11602 11670 11695 11914 11922 12213 12280 12363 12429 12430 12667 13256 13428 13552 13642 13675 13676 13752 13991 14092 14393 14463 14523 14608 14610 14611 14717 14751 14806 15580 15682 15962 15963 15997 16157 16169 16320 16330 16790 16818 16867)
Requirement "rg8snorm" loses no further reports!
Requirement "rgba8snorm" loses no further reports!
Requirement "rg11b10ufloat" loses no further reports!
Requirement "shaderStorageImageExtendedFormats" loses no further reports!
Requirement "r16unorm" loses no further reports!
Requirement "r16snorm" loses no further reports!
Requirement "rg16unorm" loses no further reports!
Requirement "rg16snorm" loses no further reports!
Requirement "rgba16unorm" loses 0 (and partially loses 6) further deviceNames:
  In ALL reports (0 deviceNames):
  In SOME reports (6 deviceNames):
    ~ Adreno (TM) 610: 3 of 89 (7037 10410 16196; ok: 8669 9434 9524 10094 10192 10384 10412 10420 10471 10516 10572 10885 10932 11059 11076 11212 11372 11375 11384 11390 11459 11522 11701 11917 11936 11946 11974 12002 12158 12294 12350 12367 12420 12546 12897 12899 12999 13031 13080 13146 13219 13257 13262 13288 13565 13651 13763 13903 13916 14022 14043 14203 14252 14331 14392 14437 14575 14594 14636 14714 14833 14836 14896 15020 15037 15174 15224 15235 15392 15403 15479 15555 15559 15597 15694 15905 15923 15967 15978 16000 16290 16488 16821 17013 17359 17400)
    ~ Adreno (TM) 612: 4 of 20 (5789 6220 7986 12216; ok: 7178 9014 10707 10874 11318 11661 12084 12126 12476 14223 14301 14525 14548 15080 15106 15657)
    ~ Adreno (TM) 615: 2 of 12 (6436 7927; ok: 8903 9147 9184 9422 10427 11275 12085 12583 12996 13171)
    ~ Adreno (TM) 618: 1 of 82 (6379; ok: 7893 9036 9037 9351 9692 9862 10286 10295 10432 10481 10488 10499 10834 10897 10945 11022 11144 11198 11217 11253 11482 11615 11796 11813 11937 12035 12055 12144 12278 12918 13032 13042 13165 13178 13238 13598 13736 13865 13866 13915 13996 13998 13999 14122 14358 14359 14423 14718 14757 14923 15200 15243 15288 15326 15412 15439 15477 15495 15509 15751 15994 16128 16130 16131 16147 16151 16152 16153 16166 16541 16566 16569 16607 16788 16872 16873 16874 16875 17120 17279 17291)
    ~ Adreno (TM) 630: 7 of 74 (5886 6434 6788 6987 7374 10300 10460; ok: 7108 7949 8473 8577 8907 9097 9267 9471 10287 10291 10302 10303 10351 10371 10424 10551 10672 10678 10730 10770 10813 10966 11016 11035 11120 11464 11602 11670 11695 11914 11922 12213 12280 12363 12429 12430 12667 13256 13428 13552 13642 13675 13676 13752 13991 14092 14393 14463 14523 14608 14610 14611 14717 14751 14806 15580 15682 15962 15963 15997 16157 16169 16320 16330 16790 16818 16867)
    ~ Adreno (TM) 640: 26 of 127 (5552 5633 6040 6188 6239 6363 6403 6603 6820 6875 7175 7237 7595 7708 9111 10305 10380 10391 10805 10847 10921 10923 11254 11495 13753 13760; ok: 7088 9426 9503 10183 10348 10368 10465 10611 10738 10768 10940 10943 10944 11070 11168 11190 11257 11334 11368 11489 11525 11575 11666 11667 11668 11671 11773 11799 11810 11847 11876 11895 11926 12423 12604 12841 12843 12846 12931 13027 13247 13309 13412 13493 13560 13629 13743 14009 14038 14101 14105 14247 14371 14416 14419 14460 14526 14561 14566 14681 14770 14793 14944 14945 14948 14987 15008 15086 15114 15116 15145 15172 15175 15189 15269 15280 15387 15493 15506 15528 15655 15681 15713 15828 15855 15915 16056 16202 16207 16300 16301 16303 16523 16543 16556 16687 16822 16824 17147 17254 17370)
Requirement "rgba16snorm" loses no further reports!

Because this extension has the potential to supersede the "rg11b10ufloat-renderable" extension, we might want to come to a consensus on this proposal and remove it before a V1.

@Kangz
Copy link
Contributor

Kangz commented Mar 15, 2023

Why is this in the v1 milestone?

@kainino0x
Copy link
Contributor

Because:

Because this extension has the potential to supersede the "rg11b10ufloat-renderable" extension, we might want to come to a consensus on this proposal and remove it before a V1.

However I'd just postpone it, it's fine if we end up with some feature flags being obsoleted by others.

@kainino0x
Copy link
Contributor

note: would obsolete #3001

@kainino0x
Copy link
Contributor

At this point, with Chrome shipped, I don't think we'll really want to remove the old extension just for a tiny bit of cleanliness. I'm going to declare this milestone 2.

@teoxoy
Copy link
Member Author

teoxoy commented Oct 4, 2023

@Kangz (who asked why the 16bit normalized formats are not filterable in this proposal, on the call today), the extension in #3839 would be required due to Vulkan needing SAMPLED_IMAGE_FILTER_LINEAR which is unavailable on "Samsung Xclipse 920, a lot of Mali devices and all Adreno 5XX devices".

@Kangz Kangz modified the milestones: Milestone 2, Milestone 1 Oct 10, 2023
@Kangz
Copy link
Contributor

Kangz commented Oct 10, 2023

Promoting to milestone 1 because we end up discussing it a lot in the context of #3001 happy to downgrade if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants