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

Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added #86435

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

jsjtxietian
Copy link
Contributor

@jsjtxietian jsjtxietian commented Dec 22, 2023

Fixes #86411

In #83452, @RandomShaper changed the following line to use RD_ENABLED instead of VULKAN_ENABLED and D3D12_ENABLED

#ifdef RD_ENABLED
features.append("Forward Plus");
features.append("Mobile");
#endif

But as far as I can see, RD_ENABLED is only defined in driver/vulkan and dx12, I'm not familiar with scon but I guess the definition there only affects the subfolder and so the editor failed to have this macro defined? Feel free to correct me.

Since I dont think revert this line is a good change as godot might support other backend for rd, this pr is a safeguard as I add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added in detect.py, I might miss some places. Thank you for your help in advance.

@RandomShaper
Copy link
Member

I wonder if all this could be managed at a more centric spot. Aside, this looks good to me. I think env.Append(CPPDEFINES=["RD_ENABLED"]) can be removed from drivers/vulkan/SCSub and drivers/d3d12/SCSub. I think they weren't contributing anything in the end.

@jsjtxietian
Copy link
Contributor Author

I think env.Append(CPPDEFINES=["RD_ENABLED"]) can be removed from drivers/vulkan/SCSub and drivers/d3d12/SCSub

Done.

@qwofford
Copy link
Contributor

qwofford commented Jan 1, 2024

This PR removed the error about Forward+ when launching a new project for me. I've read the documentation about Forward+, but it's still not clear to me exactly what it is. Is it Vulkan? A combination of tools?

I would like to test that my Forward+ is working correctly, now that this PR fixes the error message itself. I am able to load a 3D scene and interact with it, and the top right entry of my toolbar reads "Forward+". Is that sufficient evidence that things are working as intended?

@jsjtxietian
Copy link
Contributor Author

I've read the documentation about Forward+, but it's still not clear to me exactly what it is.

https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/internal_rendering_architecture.html

I guess you can understand it as a combination of fancy technologys that applys well on normal desktop hardware

the top right entry of my toolbar reads "Forward+"

I believe yes

@akien-mga akien-mga changed the title Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added Jan 2, 2024
@akien-mga
Copy link
Member

I'm surprised that the original code doesn't work, appending to env should affect the base environment everywhere. Maybe it needs an Export("env")?

Anyway, this makes things consistent with how VULKAN_ENABLED and D3D12_ENABLED are registered so this change seems fine.

@akien-mga akien-mga merged commit f3df5f7 into godotengine:master Jan 2, 2024
15 checks passed
@jsjtxietian jsjtxietian deleted the fix-fp-unsupport branch January 2, 2024 14:18
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian
Copy link
Contributor Author

jsjtxietian commented Jan 2, 2024

I wonder if all this could be managed at a more centric spot.

I'm thinking about if we can do something like, if VULKAN_ENABLED or D3D12_ENABLED enabled, add RD_ENABLED to CPPDEFINES.

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

Successfully merging this pull request may close these issues.

Forward plus unsupported error in 4.3 dev 1 for new projects
5 participants