-
Notifications
You must be signed in to change notification settings - Fork 933
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
write_texture
to a subsection of a texture on the Dx12 backend without first writing to the whole texture appears to do nothing
#1306
Comments
@Imberflur thank you for filing! |
@Imberflur I was able to look at this on an AMD machine and reproduce reliably. Bad news is - I haven't figured out if there is anything wrong going on. RenderDoc shows the temp buffer as full of zeroes (even though it's unaffected by the Good news - |
I captured it in PIX, and interestingly, it shows the correct rendering in the analysis. That means Microsoft doesn't anticipate the driver behavior that AMD does, and the DX12 runtime validation doesn't see anything wrong either. So for now my conclusion is this being a driver bug. I uploaded the code (adjusted to force DX12 and re-upload every frame) to https://github.com/kvark/wgpu-rs/tree/bug-dx12-texture-upload and filed a bug report using AMD tool. Unfortunately, it didn't give me any reference number to hold to... There is still a chance I'm missing something, and we are doing things wrong, though. Any help investigating this is welcome! |
@kvark thank you for looking into this! I'm not sure what aspects are left to investigate besides searching for Dx12 texture upload issues on AMD or investigating the Dx12 spec to see if things are being done correctly. Fortunately, it will be quite easy for me to work around this by just adding a temporary initialization for our atlas textures. |
I've filed this on the AMD side to get looked at here, thanks for the excellent repro @kvark! |
Is this still an issue on newer driver versions? |
I will try to test this soon. |
The issue still appears on wgpu 0.9 (I wasn't able to test the exact commit I listed above). The issue doesn't appear on wgpu 0.10 (I tried the commit for 0.10.0 release as well as a few other commits) nor the latest git commit on #1102 was implemented so the latest version should work even if the driver bug wasn't resolved (but I don't think this change was in wgpu 0.10?). Regardless, this issue is at least probably no longer relevant for wgpu. |
Sounds good, closing. |
Description
write_texture
for a subsection of a texture appears to do nothing on the Dx12 backend unless the whole texture was first written to. (debugging to show that subsection writes work after writing to the whole texture not detailed here)Repro steps
Apply diff to wgpu-rs and run cube example with
WGPU_BACKEND=dx12
(let me know and I can create branches for this and future issues)
Expected vs observed behavior
Expected (produced via Vulkan backend):
Observed:
Extra materials
none (let me know if an api trace is useful for this and I can get one)
Platform
Windows 10,
wgpu-rs
: 82b7068, GPU: AMD Radeon(TM) Vega 3 GraphicsThe text was updated successfully, but these errors were encountered: