-
Notifications
You must be signed in to change notification settings - Fork 967
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
Zero init textures #1688
Zero init textures #1688
Conversation
e4cd399
to
dfaffa6
Compare
dfaffa6
to
bbb9202
Compare
533a2f8
to
ae11fe2
Compare
sadly, they are typically passing even if texture zero init isn't doing its job However, they form nice isolated examples for testing out texture initialization It could be possible to dirty texture memory prior to ensure zero init did the job
* queue submit * write_texture
enforce COPY_DST usage now on all textures
init_tracker has now a `discard` function to get single data points back to uninitialized use new standardized partition_point function
missing: * init on the fly if discarded is found within command buffer * handle discarding only stencil or only depth
…through utility function allows to resolve discard/init_action interactions
CommandBufferTextureMemoryActions is now fully encapsulated
ae11fe2
to
bb0aaab
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.
I've done the first review pass. This is grand piece of work!
When the group was deciding to zero-init resources, I didn't expect this to be associated with so much complexity. And I hoped this would work together with the state tracker, while you've shown that it's better off to be a completely independent system.
neither did I. Very unlikely I would have promised to look after this thing if I knew 😄 |
3047510
to
b48d444
Compare
We have a bit of clippy complains, otherwise let's ship it! |
🥳 finally, what a relief! |
When no work is submitted for a frame, presenting the surface results in a timeout due to no work having been submitted. Fixes gfx-rs#3189. This flag was added in gfx-rs#1892 with a note that it was going to be temporary until gfx-rs#1688 landed.
When no work is submitted for a frame, presenting the surface results in a timeout due to no work having been submitted. Fixes gfx-rs#3189. This flag was added in gfx-rs#1892 with a note that it was going to be temporary until gfx-rs#1688 landed.
When no work is submitted for a frame, presenting the surface results in a timeout due to no work having been submitted. Fixes gfx-rs#3189. This flag was added in gfx-rs#1892 with a note that it was going to be temporary until gfx-rs#1688 landed.
Connections
Fixes #1102
Some preparatory work happened in: #2081, #2046, #1905, #1839
Description
Implements zero texture init using some of the same building blocks & patterns already used for buffer zero init.
Moved "inter-submit" init code to a new mod which also has utlitities to tackle the rare texure inits ("fixups") that may happen due to a discarded texture being used within an encoder/cmd-buf. The machinery for this is a bit clunky right now and may be improved down the line.
Special-special handling is given for depth/stencil discards, there are comment blocks that should explain the situation and approach (if those aren't clear enough this needs fixing as well).
Testing
Started out with new / rearranged player tests. For testing the more complicated sideffects of render target discards, a new regular unit test is added.
Overall, I believe testing is about the bare minimum that we can run with for now, but devising good ones is challenging on its own as so often.