Conversation
… for the time begin
…e swapchain texture Previously, we were copying the last of the temporary ping-pong renderbuffers to the frame renderbuffer at the end of rendering. This was probably firstly not great for performance, but also we can't do this for images gotten from DRM because they can't use `VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL`, and that is set when `wgpu.TextureUsageCopyDst` is set on the WebGPU texture, which is necessary for being able to use it as a texture copy destination. Breaks if there are any frost element at the moment, because only the initial render buffer knows to select between one of the temporary ping-pong renderbuffers and the frame renderbuffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow rendering to DRM. Previously, the swapchain buffers wouldn't be written to at all, and so they'd just flash between pure black and pure white as their default contents, at least on my machine (AMD 7040, amdgpu, FreeBSD).
Here are the other issues that need to be fixed before we can merge this:
Here are the notes I had in #33 before opening this PR:
Flashing black and white when rendering directly to DRM (instead of in nested window)
Presumably, one of the swapchain buffers is purely white and the other is purely black, and we're flipping between these. Probably some sync error where we're not waiting for rendering to complete. To figure out where the problem is (bearing in mind I don't understand what I'm doing), I'm trying to disable stuff in the
simpleexample until we get the same behaviour (inrender_pass_submit(), wheresimpleis doing its queue submission):vulkan_sync_render_buffer().pWaitSemaphoreInfosinVkSubmitInfo2KHR. (Would need an API for giving these to the Vulkan wgpu-hal for its submission.)pSignalSemaphoreInfos.Here's a couple assumptions I need to verify: