-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Compute shaders unable to write to UNIFORM_TYPE_IMAGE (uniform image2D) in D3D12 #102192
Comments
Don't work on my RTX 3070 too (NVIDIA; 32.0.15.7216). |
Updated my drivers no such luck, I'm on 572.16 (I did need an update but updating did not fix it), there's no standalone versions of directx12 anymore so I can't reinstall that, maybe it's just because I've been holding out on windows 10. |
No need to close it, it may be a target of specific fix, though. |
I have the same issue. It returns a texture with all pixels black in D3D12 and I use the same GPU as you. |
I am so sorry I miss-read your original post terribly! |
out of curiosity, what cpu do you have? |
Godot v4.4.beta (1204d5ca2) - Windows 11 (build 22621) - Multi-window, 3 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.7216) - AMD Ryzen 9 7950X 16-Core Processor (32 threads) |
Ok My cpu is a AMD Ryzen 5 5600x, this may just be a coincidence but maybe it's the cpu? (grasping at straws here a little), @Chaosus if you don't mind me asking, what is the vender of your cpu? |
Tested versions
Reproducible in 4.4beta1 and 4.3stable.
Tried to do it in 4.2 and the option for d3d12 doesn't exist, I presume that's when directx support was added in the first place.
Which implies that this maybe has never worked correctly?
System information
Godot v4.4.beta1.mono - Windows 10 (build 19045) - Single-window, 2 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6636) - AMD Ryzen 5 5600X 6-Core Processor (12 threads)
Issue description
When running any compute shader in the D3D12 driver all writing to Image2D seemingly is either not executed, or not retrieval-able from cpu entirely.
This is both in personal projects as well as example projects like the Compute Shader Heightmap Demo
Steps to reproduce
Expected Result (and the result you get on vulkan):

Actual Result:

Minimal reproduction project (MRP)
You can download the heightmap demo from the asset store or directly from here: https://github.com/godotengine/godot-demo-projects/tree/4.2-31d1c0c/misc/compute_shader_heightmap
A note, the recorded time elapsed being so similar in both examples might be a result of a significant amount of the time being in syncing/retrieving the image data for viewing in the player on the main rendering thread, and may not be indicative of the compute shader executing correctly. In short I do not know if the compute shader is even being executed.
Also there are no errors resulting from this, or my personal project attempts at using d3d12 with compute shaders, they just don't output any data.
Please note, non-image related compute shaders are functioning, like with my draw indirect PR example project here: #99455 which I tested and it ran fine, no errors and grass was placed correctly in the frustum. So this issue seems to be entirely related to Image2D uniforms.
The text was updated successfully, but these errors were encountered: