Skip to content

add pipeline constants plumbing#4677

Merged
teoxoy merged 5 commits intogfx-rs:pipeline-constantsfrom
teoxoy:pipeline-constants
Nov 14, 2023
Merged

add pipeline constants plumbing#4677
teoxoy merged 5 commits intogfx-rs:pipeline-constantsfrom
teoxoy:pipeline-constants

Conversation

@teoxoy
Copy link
Copy Markdown
Member

@teoxoy teoxoy commented Nov 13, 2023

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

Tracking meta issue: #4484.

@teoxoy teoxoy requested 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 force-pushed the pipeline-constants branch from 3875cac to c3f93e6 Compare November 14, 2023 13:58
@teoxoy teoxoy merged commit c3f93e6 into gfx-rs:pipeline-constants Nov 14, 2023
@teoxoy
Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants