Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Limit for the sample count mask#932

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kvark wants to merge2 commits intogpuweb:main
base:main
Choose a base branch
Loading
fromkvark:msaa
Draft

Conversation

@kvark
Copy link
Contributor

@kvarkkvark commentedJul 17, 2020
edited by pr-previewbot
Loading

Related to the investigation in#108
We know that we can universally support MSAA x4, but we'd want to use higher levels if available, too.
This shouldn't be a portability concern, since most applications are written to support various sample counts, so they can trivially adjust to platforms that have different mask than the developers machine.


Preview |Diff

@Kangz
Copy link
Contributor

At least in Vulkan the sample count, the set of supportedsampleCount is per-format. It happens that the Vulkan spec requires that 4 is supported for all formats we care about. How confident are we that for othersampleCount values, Vulkan drivers either support it on all formats, or none?

@kvark
Copy link
ContributorAuthor

I'dlike to be able to reason about the API orthogonally here, i.e. for a format - either it supports multisampling in general or not, and for the sample count - which are supported. But of course, the reality is more complicated.

In D3D12, 128-bit formatsmay not support MSAA-8x, while other formats guarantee to support it.
In Metal, the sample count support is not per-format, as far as I can see.
And in Vulkan, I don't know how we can reasonably get that information.

Concluding:

  1. it would be nice to get more detailed information on Vulkan MSAA support, but it's not inhttps://vulkan.gpuinfo.org/ as far as I see
  2. there is a bigger question of how to we define which formats support what kind of stuff
  3. having the limit as in the PR is a good first step in exposing MSAA in a limited way. We can keep thinking about how to expose more of it.

@kainino0x
Copy link
Contributor

So what would this PR mean? That that sample count is supported for all formats? Or that it may be supported for any format?

@kvark
Copy link
ContributorAuthor

@kainino0x supported for allrenderable formats

@Kangz
Copy link
Contributor

I think that Vulkan and D3D12 might prevent such a semantic (apart for 1 and 4)

@kvark
Copy link
ContributorAuthor

@Kangz right, so with this semantic we'd expose:

  • on Vulkan: the mask of 5
  • on D3D12: we'd check 128-bit formats for MSAA-8x support, and expose the mask of 13 if all of them do, or 5 otherwise
  • on Metal: the mask built on thesupportsTextureSampleCount queries

This is not capturing the full extent of device capabilities, surely. We may need something more detailed, on a per-format basis. But I think this could be a good starting point until we get that more complicated solution in place. If we don't have that mask in the limit, we basically have no way at all to use multi-sampling.

@Kangz
Copy link
Contributor

If we don't have that mask in the limit, we basically have no way at all to use multi-sampling.

We do, WebGPU guarantees that a sample mask of 4 is allowed (except when explicitly disallowed for compressed and array textures). Am I missing something?

@kvark
Copy link
ContributorAuthor

We do, WebGPU guarantees that a sample mask of 4 is allowed (except when explicitly disallowed for compressed and array textures). Am I missing something?

We don't have that in the spec today.

@kvark
Copy link
ContributorAuthor

Marking as "needs investigation" for the limit that@Kangz mentioned about the total byte size of the exported pixel. My hope is that we can have that limit landing orthogonally from MSAA.

@kvark
Copy link
ContributorAuthor

Updated with the new limit that would let us expose DX12's MSAA capabilities.

The default limit supports MSAA levels of 4 and 1 (non-multisampled), resulting in the mask value of 5.

One mask is[=better=] than the other if it fully includes it.
:<dfn>maxTexelBlockSize</dfn>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
:<dfn>maxTexelBlockSize</dfn>
:<dfn>maxTexelBlockSize</dfn>

One mask is[=better=] than the other if it fully includes it.
:<dfn>maxTexelBlockSize</dfn>
::
Maximum size of a texel block that a texture can have.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
Maximum size of a texel block that a texture can have.
Maximum sizein bytesof a texel block that a texture can have.

GPUSize32 maxUniformBuffersPerShaderStage = 12;
GPUSize32 maxUniformBufferBindingSize = 16384;
GPUSize64 sampleCountMask = 5;
GPUSize64 maxTexelBlockSize = 64;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It would be good to have confirmation from the D3D12 and Metal team that this is the only additional restriction we can see in the future. Same thing for the Vulkan WG.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yesterday I suggested describing the limit this way in prose (or just not at all for now), but not exposing API surface for it in GPULimits. It doesn't serve any purpose until we have 8x MSAA (the largest texel block size we have right now is 4x rgba32float = 64 bytes). That way we can change how we describe it if needed.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's certainly not the only restriction. I need to see how to fit Metal in there...

@kvarkkvark marked this pull request as draftSeptember 15, 2020 14:13
@kdashg
Copy link
Contributor

@kvark Is this done?

@kvark
Copy link
ContributorAuthor

I think the consensus here is that we don't have a consensus for how to expose MSAA counts :)
So this isn't done, and we'll need to revisit this, probably shortly after MVP.

@kvarkkvark added this to thepost-MVP milestoneAug 23, 2021
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull requestSep 6, 2022
* Adds some device.destroy and lost tests.- Changes the tests to save the entire lost info interface instead of just the message so that we can identify the reason for device lost and suppress failures when tests expect devices to be destroyed.Issue:gpuweb/cts#882* First round comment fixes/revisions.* Apply suggestions from code reviewCo-authored-by: Kai Ninomiya <kainino1@gmail.com>
@kainino0xkainino0x added the apiWebGPU API labelMay 21, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@KangzKangzKangz left review comments

@kainino0xkainino0xkainino0x left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

apiWebGPU API

Projects

None yet

Milestone

Milestone 4+

Development

Successfully merging this pull request may close these issues.

4 participants

@kvark@Kangz@kainino0x@kdashg

[8]ページ先頭

©2009-2025 Movatter.jp