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

[pull] main from gpuweb:main #1

Open
wants to merge 292 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 28, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Feb 28, 2024
dneto0 and others added 29 commits April 30, 2024 21:56
The section for an attribute has the following structure:

   <grammar>

   <valid values><rules for the parameters>
   <description> <must-rules>
                 <describe what it is>

That puts the high level information last.

Reorder the sections so they have this structure:

   <grammar>

   <description> <describe what it is>
                 <must-rules>
   <parameters><rules for the parameters>

I think this reads better

Co-authored-by: Mehmet Oguz Derin <[email protected]>
Fixes #4561

* Add shader- and pipeline-creation errors to smoothstep if `low >=
  high`
* A line break to improve rendering of the formula
Uses this function for all GPUObjectBase-derived
types to ensure that the internal `[[device]]` and
`[[label]]` are properly set on creation.
* Remove [[internal]] concept

* Addressing feedback

* Update spec/index.bs

Co-authored-by: Kai Ninomiya <[email protected]>
* wgsl: Reduce shader limits

Fixes #4545
Fixes #4546
Fixes #4547
Fixes #4548
* Indicate timeline for majority of algorithms

* Addressing feedback

* Define 'any timeline'

* Apply Kai's suggestions from code review

* More feedback

* Apply more Kai suggestions from code review

---------

Co-authored-by: Kai Ninomiya <[email protected]>
Fixes #4607, #4600
- Allow 2d-array texture view as renderable texture view
- Disallow 3d texture view used in resolve target
Fixes #4623

* Add bit reinterpretation built-in functions to list of flushable
  functions
Add the restriction that only a single aspect (stencil-only or
depth-only) may be used specified per texture in a given draw.
* Add missing limits to the correspondence doc

* Apply Kai's suggestions from code review

---------

Co-authored-by: Kai Ninomiya <[email protected]>
…4641)

* Add coordinate system diagrams and fix NDC to framebuffer equation

* Apply Kai's suggestions from code review

* Address more feedback

* Made the diagrams responsive to light/dark mode

* Apply more of Kai's suggestions from code review

---------

Co-authored-by: Kai Ninomiya <[email protected]>
sample_mask and sample_index usage should genearte an error
at shader module creation time, not pipleine creation time.
* Add a better definition for 'texture'

* Addressing Corentin's feedback

* Apply Kai's suggestion

---------

Co-authored-by: Kai Ninomiya <[email protected]>
* Describe how comparison samplers interact with filtering

* Apply Kai's suggestion

* Fix inverted compare pass/fail values

* Apply more of Kai's suggestions from code review

---------

Co-authored-by: Kai Ninomiya <[email protected]>
* Deduped most image/buffer copy validation

* Addressing more feedback

* Make the algorithm work for source and destination textures

* Move 'validating texture copy range' step under 'validating GPUImageCopyTexture'
* Make valid, invalid, and expired regular properties

* Apply Kai's suggestions from code review

* Fixing several TODOs

* Rebase

---------

Co-authored-by: Kai Ninomiya <[email protected]>
* add first and either to interpolate
beaufortfrancois and others added 30 commits November 22, 2024 13:24
* Switch "validating GPUVertexState" to algorithm style

* Fix attribute validation
I believe these examples are left over from before WGSL had `for` loops.
Now that WGSL has for loops these examples showing a `for` loop
expressed with `loop` can directly reference `for` in WGSL.

Fixed: #4996
Introduce float16-renderable and float32-renderable as optional features
in Compatibility mode, and required in Core.
Add new limits for storage buffers and textures in the fragment stage.
* Add attributes

* Normalize line endings

* Trim trailing blankspaces

* Make endings consistent
Now that GPUAdapter.featureLevel has landed in the core spec, remove
the GPUAdapter.compatibilityMode IDL change from the proposal.
Explain that setting GPUAdapter.featureLevel to "compatibility"
enables Compatibility Mode validation. Change the
GPUAdapter.isCompatibilityMode boolean to a "featureLevel" DOMString.
* texel buffer proposal: Update from review

- Clarify Metal limits are in units of pixels
- Add TODO to get info for pre-Apple silicon Metal GPUs
- Add @teoxoy's question about uniform texel buffer as an open question

Followup to #4912

* Update per review

Resolve the 'uniform texel buffer' question: read-only views map to
uniorm texel buffers.

Add the question about needing another create-view method for these.
`Status: LD` is "Living Document", which makes sense but has broken CSS
if used with `Group: webgpu`. If not used with `Group: webgpu` then the
license is CC0 (Public Domain) which is probably fine but not really
appropriate.

`Status: UD` is "Unofficial Proposal Draft", which is not really what I
would call this document, but it renders correctly :)

Any other status causes an error message saying something like: "You
used Status NOTE, but your Group (WEBGPU) is limited to the statuses
CG-DRAFT, CG-FINAL, or UD." (Probably LD isn't supposed to be used
either and that's why it's broken.)

Documentation: https://speced.github.io/bikeshed/#metadata
New spec drafts need to be published as "Candidate Recommendation Drafts".
This status requires a deadline date to be specified. That deadline could
be set as a `W3C_BUILD_OVERRIDE` parameter in the workflow, but then it's
inherent to the specs, so it seems good to have it defined in the source
directly. (That information is not useful for the Editor's Draft in theory,
but also needed in practice since Bikeshed replaces all macro texts in the
boilerplate before it drops the bits that aren't needed).

The update also adds a link to the test suite in WebGPU and renames "Tests"
into "Test Suite" in WGSL (usual name across specs).
* API
  * new feature: subgroups
  * new properties for adapter info:
    * subgroupMinSize
    * subgroupMaxSize
* WGSL
  * new enable: subgroups
  * new built-in values
    * subgroup_invocation_id
    * subgroup_size
  * subgroup and quad built-in functions
  * new uniformity diagnostic subgroup_uniformity
This patch relaxes the check on the parameter `index` in
`getBindGroupLayout()` by allowing `index < limits.maxBindGroups`
instead of only limiting `index` must be less than the array size
of the bind group layouts used in the creation of the pipeline.
Should unbreak the build for now (but publishing will still be broken)
speced/bikeshed#3012

We can make build-validate-publish required for PRs, and make
publish-TR-webgpu and publish-TR-wgsl optional.
Here's the proposal in code

   requestDevice({ requestedLimits }) {
     // make a copy of the requested limits
     const effectiveRequestedLimits = { ...requestedLimits };

     // update the effective requested limits
     effectiveRequestedLimits.maxStorageBuffersPerShaderStage = Math.max(
        requestedLimits.maxStorageBuffersInFragmentStage,
        requestedLimits.maxStorageBuffersInVertexStage,
        requestedLimits.maxStorageBuffersPerShaderStage);

     effectiveRequestedLimits.maxStorageTexturesPerShaderStage = Math.max(
        requestedLimits.maxStorageTexturesInFragmentStage,
        requestedLimits.maxStorageTexturesInVertexStage,
        requestedLimits.maxStorageTexturesPerShaderStage);

     // request the device using the effectiveRequestedLimits following the normal
     // validation rules. If any requested limit exceeds the adapter's limit then
     // throw an OperationError

     // device creation succeeded

     if (featureLevel === 'core') {
       // this effectively leaves core validation the same as it has always been.
       device.limits.maxStorageBuffersInFragmentStage = device.limit.maxStorageBuffersPerShaderStage;
       device.limits.maxStorageBuffersInVertexStage = device.limit.maxStorageBufferPerShaderStage;

       device.limits.maxStorageTexturesInFragmentStage = device.limit.maxStorageTexturesPerShaderStage;
       device.limits.maxStorageTexturesInVertexStage = device.limit.maxStorageTexturesPerShaderStage;
     }

With the limits set as above, apply the validation as specified in the proposal at createBindGroupLayout, createPipelineLayout (including "auto" layout creation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.