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

tracking for EXTERNAL texture use #3019

Closed
wants to merge 1 commit into from

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Sep 12, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Resolves #2948

Description
This pull request adds tracking for a new EXTERNAL texture use. In the Vulkan hal, a new parameter for texture_from_raw to specify the owning foreign queue of the texture is added and logic changes to transition external textures to and from the external queue.

Testing
An example needs to be created to use an image that would have an EXTERNAL texture use.

I will write an example to test this. It will probably be an example using kernel mode setting (KMS).

Regarding testing on CI, I am not certain how we could approach that.

@i509VCB i509VCB force-pushed the vk-image-queue branch 4 times, most recently from 09fbc79 to 9bd347b Compare September 16, 2022 03:27
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.

I'm quite happy with how this turned out - I have some comments but good stuff.

wgpu-core/src/device/queue.rs Outdated Show resolved Hide resolved
wgpu-core/src/device/queue.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/device.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2022

Codecov Report

Merging #3019 (d4c0adf) into master (d4b1d57) will decrease coverage by 0.10%.
The diff coverage is 31.45%.

@@            Coverage Diff             @@
##           master    #3019      +/-   ##
==========================================
- Coverage   64.64%   64.53%   -0.11%     
==========================================
  Files          82       82              
  Lines       39501    39608     +107     
==========================================
+ Hits        25534    25560      +26     
- Misses      13967    14048      +81     
Impacted Files Coverage Δ
wgpu-core/src/device/mod.rs 66.22% <0.00%> (-0.11%) ⬇️
wgpu-core/src/hub.rs 60.03% <0.00%> (-0.80%) ⬇️
wgpu-core/src/track/mod.rs 75.18% <0.00%> (ø)
wgpu-hal/src/dx11/device.rs 0.00% <0.00%> (ø)
wgpu-hal/src/dx12/mod.rs 27.10% <0.00%> (-0.25%) ⬇️
wgpu-hal/src/empty.rs 0.00% <0.00%> (ø)
wgpu-hal/src/gles/device.rs 79.93% <0.00%> (-0.25%) ⬇️
wgpu-hal/src/lib.rs 26.21% <ø> (ø)
wgpu-hal/src/vulkan/instance.rs 37.54% <0.00%> (-0.07%) ⬇️
wgpu-hal/src/vulkan/mod.rs 55.46% <0.00%> (-0.92%) ⬇️
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@i509VCB i509VCB marked this pull request as ready for review November 23, 2022 23:37
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.

G2G minus these small issues

wgpu-hal/src/assertions.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/device.rs Outdated Show resolved Hide resolved
@cwfitzgerald
Copy link
Member

Sorry this one got lost in the chaos, can you merge main, then we should be good to go

desc.usage.contains(crate::TextureUses::EXTERNAL),
"Texture specifies external queue family ownership but does not have TextureUse::EXTERNAL"
);
}

Choose a reason for hiding this comment

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

Aren't these two assertions wrong ? They don't match the error message or the comments above

@cwfitzgerald
Copy link
Member

As this MR is currently stale, I'm going to close it for triage purposes. Please feel-free to re-open there is renewed interest in landing these changes!

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.

Vulkan hal should allow specifying what memory barriers to insert for custom textures
4 participants