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

Attempted to use the same texture in framebuffer attachment and a uniform (set: 0, binding: 0), this is not allowed. Error continuously spams upon startup #90099

Closed
chrisl8 opened this issue Apr 1, 2024 · 5 comments · Fixed by #90191

Comments

@chrisl8
Copy link
Contributor

chrisl8 commented Apr 1, 2024

Tested versions

EDIT: Reproducible with: Godot v4.3.dev (29b3d9e)

EDIT: I will update with a better starting commit later if this isn't solved before I find it. My previous "working"/"not working" commits were mistaken.
It seems like this error started some time back though.

For sure it does not happen in 4.2.1, so it is a new error for 4.3, at least in this project.

System information

Godot v4.3.dev (29b3d9e) - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.5186) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

Issue description

Immediately upon starting the Godot 2D GPUParticles3D demo project the output will spam this message continuously:

ERROR: Attempted to use the same texture in framebuffer attachment and a uniform (set: 0, binding: 0), this is not allowed.

This seems like it could be related to #81928 however this does not happen with the 2D GPUParticles3D in version 4.2.1

Steps to reproduce

Start the Godot 2D Particles demo project found here
https://github.com/godotengine/godot-demo-projects/tree/master/2d/particles

Minimal reproduction project (MRP)

Use the 2D GPUParticles3D demo project found here:
https://github.com/godotengine/godot-demo-projects/tree/master/2d/particles

@AThousandShips
Copy link
Member

Can you do a bisect to pinpoint what commit actually introduced this? You're listing a period of 3 months

Also can you try a recent commit? You're testing a 2 months old commit

@chrisl8
Copy link
Contributor Author

chrisl8 commented Apr 1, 2024

Also can you try a recent commit? You're testing a 2 months old commit

Sorry I wasn't clear, it happens on Master too, the latest version.

But yes, I can do some more checking to figure out what point it actually happened. I was attempting to do that, but now realize I failed, sorry. I'll update when I find the precise commit.

Again though, it also happens on Master. I was just trying to pinpoint when it started, but clearly didn't do a great job of that.

@chrisl8
Copy link
Contributor Author

chrisl8 commented Apr 1, 2024

@AThousandShips

This problem appears to start here:
9cbe3cb...ef94545

Again, I realize this is ages ago, last year, but I do not see this stream of errors if I build from 9cbe3cb (or older), but it is consistent if I build from ef94545 or newer, including the tip of master.

Apologies if my methods of deduction are flawed, but hopefully this helps narrow down the cause of these errors, or a "breaking change" notice of some sort.

@akien-mga
Copy link
Member

That's #84169, cc @BastiaanOlij.

@BastiaanOlij
Copy link
Contributor

BastiaanOlij commented Apr 4, 2024

Seeing this is a 2d project and has its root node wrongfully named GPUParticles3D, it shouldn't be impacted by the 3D rendering pipeline. The only reason it's doing 3D stuff is because we have an environment configured (the root note is an environment) and we have background set to canvas. This is only done so you can turn on glow. I wonder how many people this puts on the wrong foot...

That said, indeed when you use canvas as the background, that means we render 2D first, then copy the contents into our 3D buffers, then render 3D, then apply glow. The optimisation I did in 84169 combines two of those steps into subpasses that in this case, can't be combined as we're reading from, and writing to, the same buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants