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

Implement Unorm10_10_10_2 VertexFormat #1

Open
wants to merge 127 commits into
base: trunk
Choose a base branch
from
Open

Conversation

McMackety
Copy link
Owner

Connections

Testing
This PR was both manually tested with an out-of-tree project, and is automatically tested with the WebGPU conformance tests.

Checklist

  • [ X ] Run cargo fmt.
  • [ X ] Run cargo clippy. If applicable, add:
    • [ X ] --target wasm32-unknown-unknown
    • [ X ] --target wasm32-unknown-emscripten
  • [ X ] Run cargo xtask test to run tests.
  • [ X ] Add change to CHANGELOG.md. See simple instructions inside file.

McMackety and others added 30 commits February 11, 2024 17:25
This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
…elper

This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports
[`VK_EXT_validation_features`], we can configure it with another instance
creation info. element of type [`VkValidationFeaturesEXT`] to enable
GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do
this in the Vulkan backend. It's even already finding issues in our
`examples` and other tests! But…we'd like to handle those later, since
this is so important for users. So, I've broken that out to separate
issues. The instances we're aware of:

* `water` is running into sync. validation issues: see
  <gfx-rs#5231>
* `wgpu_test::shader::struct_layout::uniform_input` is failing to
    instrument shaders now; see
    <gfx-rs#5245>

It is apparent from this and the [DX12 implementation of GPU-based
validation] that we will need to communicate clearly to users that
`InstanceFlags::GPU_BASED_VALIDATION` implies
`InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have
[split out this work][follow-up for flag implication].

Note that `VK_EXT_validation_features` has been deprecated in favor of
the more general layer configuration mechanism offered by
[`VK_EXT_layer_settings`].

[DX12 implementation of GPU-based validation]: gfx-rs#5146
[`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html
[`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html
[`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html
[`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html
[follow-up for flag implication]: gfx-rs#5232
…mp` (gfx-rs#5188)

* split out TIMESTAMP_QUERY_INSIDE_ENCODERS from TIMESTAMP_QUERY

* changelog entry

* update changelog change number

* fix web warnings

* single line changelog

* note on followup issue
…rs#5248)

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
handled even when this name is not in the input SPIRV.
since we probably shouldn't be naming things if they don't have a name
in the input.

As requested here: gfx-rs#5227 (comment)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* doc: as of gfx-rs#4597 surface creation is no longer unsafe

* doc: extend documentation of the include_wgsl macro
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* Remove GPU based validation in Tests

* Lol Typo
… 2d (gfx-rs#5274)

* Validate that the view dimension of a multisampled texture binding is 2d

* typo
jimblandy and others added 9 commits March 29, 2024 11:54
In `wgpu_hal::vulkan::InstanceShared::inspect`, handle
`PhysicalDeviceCapabilities::maintenance_3` more like the way we
handle other extension-provided physical device properties.
Specifically, use `Option::insert` to populate the `Option` and borrow
a mutable reference to its value, rather than calling
`.as_mut().unwrap()`.

This change should have no observable effect on behavior. It simply
replaces a runtime check (`unwrap`) with a statically checked
borrow (`insert`).
Flesh out documentation for `PhysicalDeviceFeatures` and
`PhysicalDeviceCapabilities`.
* enhance vertex_indices test to also run with render bundles

* fix render bundle index limit check

* changelog entry
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
@teoxoy
Copy link

teoxoy commented Apr 2, 2024

Hey! I think you meant to open this PR over on https://github.com/gfx-rs/wgpu (instead of your fork).

jimblandy and others added 8 commits April 2, 2024 12:49
Since this struct's role is to hold all the relevant "VkFooProperties"
structs we can get about a given physical device, and "capabilities"
means something else in Vulkan (SPIR-V capabilities), it seems that
`PhysicalDeviceProperties` is a better name.
Improve documentation for:
- `PhysicalDeviceFeatures::from_extensions_and_requested_features`
- `PhysicalDeviceFeatures::to_wgpu`
- `Adapter::physical_device_features`
This helps out-of-tree backends.

Fixes gfx-rs#5398.
@McMackety
Copy link
Owner Author

@teoxoy I did this PR as part of an class project where we weren't supposed to merge this.

Though if web-sys has been updated I'd be more than happy to integrate this into wgpu's latest branch.

@McMackety
Copy link
Owner Author

I'll go ahead and make a PR on the main repo that way this can be discussed better within wgpu.

crowlKats and others added 10 commits April 2, 2024 14:36
* chore: update deno

* update spec

* more error handling

* cleanup queue

* fix

* fix byow

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>

* fix

* fix

* fix

* fixes

* fix cts

* clean

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
* Add return value to Texture::as_hal()

* Add TextureView::as_hal()

* Add CommandEncoder::as_hal_mut()

* Add changelog

* Add TextureView::raw_handle()

* Add CommandEncoder::raw_handle()

* Add additional docs for command_encoder_as_hal_mut
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
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.

Missing VertexFormat unorm10_10_10_2 present in other implementations