-
Notifications
You must be signed in to change notification settings - Fork 961
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
[wgpu-hal] #5956 windows-rs
migration followups and cleanups
#6173
Conversation
e6fcdad
to
40ec498
Compare
40ec498
to
f50eaa5
Compare
The last remaining item seems to be #5956 (comment). |
@teoxoy the last I remember is that that was hard to do as Let me re-check what's possible nowadays. |
f50eaa5
to
be2ec15
Compare
@teoxoy |
be2ec15
to
12c8ecc
Compare
PR gfx-rs#5956 wasn't fully complete and still had some outstanding minor issues and cleanups to be done, as well as hidden semantic changes. This addresses a bunch of them: - Remove unnecessary `Error` mapping to `String` as `windows-rs`'s `Error` has a more complete `Display` representation by itself. - Remove `into_result()` as every call could have formatted the `windows-rs` `Error` in a log call directly. - Pass `None` instead of a pointer to an empty slice wherever possible (waiting for microsoft/win32metadata#1971 to trickle down into `windows-rs`). - Remove `.clone()` on COM objects (temporarily increasing the refcount) when it can be avoided by inverting the order of operations on `raw` variables.
12c8ecc
to
14d4c79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
PR #5956 wasn't fully complete and still had some outstanding minor issues and cleanups to be done, as well as hidden semantic changes. This addresses a bunch of them:
Error
mapping toString
aswindows-rs
'sError
has a more completeDisplay
representation by itself.into_result()
as every call could have formatted thewindows-rs
Error
in a log call directly.None
instead of a pointer to an empty slice wherever possible (waiting for MarkID3D12GraphicsCommandList::ClearDepthStencilView
pRects
asOptional
microsoft/win32metadata#1971 to trickle down intowindows-rs
).ptr::null_mut()
, which "fixes DX12 backend no longer works after #5956 #6162"..clone()
on COM objects (temporarily increasing the refcount) when it can be avoided by inverting the order of operations onraw
variables.Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
Description
Describe what problem this is solving, and how it's solved.
Testing
Explain how this change is tested.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.