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

add pipeline constants plumbing #4677

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Nov 13, 2023

Adds pipeline constants plumbing to the pipeline-constants feature branch.

Tracking meta issue: #4484.

@teoxoy teoxoy requested a review from a team as a code owner November 13, 2023 16:56
@teoxoy teoxoy requested a review from a team November 13, 2023 16:56
@teoxoy teoxoy requested a review from a team as a code owner November 13, 2023 16:56
@teoxoy teoxoy force-pushed the pipeline-constants branch 5 times, most recently from 80def48 to 3875cac Compare November 13, 2023 18:35
Wumpf and others added 5 commits November 13, 2023 19:04
…4647)


Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Introduce a new struct type, `Scalar`, combining a `ScalarKind` and a
`Bytes` width, and use this whenever such pairs of values are passed
around.

In particular, use `Scalar` in `TypeInner` variants `Scalar`, `Vector`,
`Atomic`, and `ValuePointer`.

Introduce associated `Scalar` constants `I32`, `U32`, `F32`, `BOOL`
and `F64`, for common cases.

Introduce a helper function `Scalar::float` for constructing `Float`
scalars of a given width, for dealing with `TypeInner::Matrix`, which
only supplies the scalar width of its elements, not a kind.

Introduce helper functions on `Literal` and `TypeInner`, to produce
the `Scalar` describing elements' values.

Use `Scalar` in `wgpu_core::validation::NumericType` as well.
@teoxoy teoxoy merged commit c3f93e6 into gfx-rs:pipeline-constants Nov 14, 2023
25 checks passed
@teoxoy
Copy link
Member Author

teoxoy commented Nov 14, 2023

I pushed the commit to upstream by mistake (instead of origin) which caused the PR to be "merged"...

I force pushed to revert this but it seems I can't reopen this PR, will open a new one.

@jimblandy
Copy link
Member

New PR is #4683.

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

Successfully merging this pull request may close these issues.

None yet

4 participants