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

Remove IDs from wgpu traits #6134

Merged
merged 7 commits into from
Aug 27, 2024
Merged

Remove IDs from wgpu traits #6134

merged 7 commits into from
Aug 27, 2024

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Aug 20, 2024

Another stepping stone towards #5121.

The first commit is the result of a lot of regex replaces, the next 3 commits are manual fixes. The PR needs to be squashed but I figured it might be easier to review the steps individually.

Resolves #6080.

@teoxoy teoxoy requested a review from a team as a code owner August 20, 2024 15:03
@teoxoy teoxoy self-assigned this Aug 20, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Changelog thing, take or leave

CHANGELOG.md Outdated Show resolved Hide resolved
@teoxoy teoxoy enabled auto-merge (squash) August 27, 2024 09:51
@teoxoy teoxoy merged commit 338678a into gfx-rs:trunk Aug 27, 2024
25 checks passed
@teoxoy teoxoy deleted the rem-ids-from-wgpu branch August 27, 2024 10:00
@MarijnS95
Copy link
Contributor

MarijnS95 commented Aug 27, 2024

Cool that this just got merged, but it also caused a regression on as_hal() it seems (if I didn't rebase before writing that code, it would've been easier to spot!). When I call device.as_hal::<wgpu::hal::dx12::Api, _, _>(..) on the output from adapter.request_device(), I get a panic of the form:

thread 'main' panicked at wgpu\src\context.rs:737:5:
assertion failed: data.is::<T>()
stack backtrace:
...
  16:     0x7ff6b986c4a3 - wgpu::context::downcast_ref<wgpu::backend::wgpu_core::Device>
                               at ...wgpu\wgpu\src\context.rs:737
  17:     0x7ff6b94e36ea - wgpu::api::device::impl$0::as_hal::closure$0<wgpu_hal::dx12::Api,wgpu_examples::hello_triangle::run::async_fn$0::closure_env$0,enum2$<core::result::Result<windows::Win32::Graphics::CompositionSwapchain::IPresentationFactory,windows_result::error::Error> >
                               at ...wgpu\wgpu\src\api\device.rs:444
  18:     0x7ff6b94b7cfe - enum2$<core::option::Option<ref$<wgpu::backend::wgpu_core::ContextWgpuCore> > >::map<ref$<wgpu::backend::wgpu_core::ContextWgpuCore>,enum2$<core::result::Result<windows::Win32::Graphics::CompositionSwapchain::IPresentationFactory,windows_result::error::Err
                               at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23\library\core\src\option.rs:1075
  19:     0x7ff6b94e3656 - wgpu::api::device::Device::as_hal<wgpu_hal::dx12::Api,wgpu_examples::hello_triangle::run::async_fn$0::closure_env$0,enum2$<core::result::Result<windows::Win32::Graphics::CompositionSwapchain::IPresentationFactory,windows_result::error::Error> > >
                               at ...wgpu\wgpu\src\api\device.rs:439
  20:     0x7ff6b94cbb63 - wgpu_examples::hello_triangle::run::async_fn$0
                               at ...wgpu\examples\src\hello_triangle\mod.rs:108
  21:     0x7ff6b94ad165 - pollster::block_on<enum2$<wgpu_examples::hello_triangle::run::async_fn_env$0> >
                               at C:\Users\Marijn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\pollster-0.3.0\src\lib.rs:128
  22:     0x7ff6b940eda5 - wgpu_examples::hello_triangle::main
                               at ...wgpu\examples\src\hello_triangle\mod.rs:268
  23:     0x7ff6b93f1723 - wgpu_examples::main
                               at ...wgpu\examples\src\main.rs:229
...
error: process didn't exit successfully: `target\debug\wgpu-examples.exe hello_triangle` (exit code: 101)

@ErichDonGubler
Copy link
Member

ErichDonGubler commented Aug 27, 2024

@MarijnS95: Filed an issue to track that at #6169. Deets there plz?

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

Successfully merging this pull request may close these issues.

wgpu::Buffer implementing PartialEq, Eq, and Hash
6 participants