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

Master branch doesn't compile in MSVC 2017 #82322

Closed
SlugFiller opened this issue Sep 25, 2023 · 4 comments · Fixed by #82450
Closed

Master branch doesn't compile in MSVC 2017 #82322

SlugFiller opened this issue Sep 25, 2023 · 4 comments · Fixed by #82450

Comments

@SlugFiller
Copy link
Contributor

Godot version

fcbc50e

System information

MSVC 2017

Issue description

Seems like MSVC doesn't respect using namespace in parameters inside function definition.

drivers\gles3\storage\texture_storage.cpp(834): error C2872: 'Texture': ambiguous symbol
C:\Docs\Programs\godotengine\scene/resources/texture.h(46): note: could be 'Texture'
c:\docs\programs\godotengine\drivers\gles3\storage\texture_storage.h(145): note: or       'GLES3::Texture'
drivers\gles3\storage\texture_storage.cpp(834): error C2039: 'Type': is not a member of 'Texture'
C:\Docs\Programs\godotengine\scene/resources/texture.h(46): note: see declaration of 'Texture'
drivers\gles3\storage\texture_storage.cpp(834): error C2065: 'Type': undeclared identifier
drivers\gles3\storage\texture_storage.cpp(834): error C2146: syntax error: missing ')' before identifier 'p_type'
drivers\gles3\storage\texture_storage.cpp(834): error C2143: syntax error: missing ';' before '{'
drivers\gles3\storage\texture_storage.cpp(834): error C2447: '{': missing function header (old-style formal list?)
scons: *** [drivers\gles3\storage\texture_storage.windows.editor.dev.x86_64.obj] Error 2

Caused by 23603e4 (no PR)

Fix:

diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp
index 6ccd4246e6..4d7e08c849 100644
--- a/drivers/gles3/storage/texture_storage.cpp
+++ b/drivers/gles3/storage/texture_storage.cpp
@@ -831,7 +831,7 @@ void TextureStorage::texture_proxy_initialize(RID p_texture, RID p_base) {
 	texture_owner.initialize_rid(p_texture, proxy_tex);
 }
 
-RID TextureStorage::texture_create_external(Texture::Type p_type, Image::Format p_format, unsigned int p_image, int p_width, int p_height, int p_depth, int p_layers, RS::TextureLayeredType p_layered_type) {
+RID TextureStorage::texture_create_external(GLES3::Texture::Type p_type, Image::Format p_format, unsigned int p_image, int p_width, int p_height, int p_depth, int p_layers, RS::TextureLayeredType p_layered_type) {
 	Texture texture;
 	texture.active = true;
 	texture.is_external = true;

Steps to reproduce

Try to build

Minimal reproduction project

N/A

@SlugFiller
Copy link
Contributor Author

Actually, it might be caused by SCU rather than MSVC. Or perhaps the combination of the two. Haven't tested all possible combinations.

@clayjohn
Copy link
Member

Might be caused by #81200

@SlugFiller
Copy link
Contributor Author

Might be caused by #81200

Doesn't seem related. It's a completely different file, in a completely different module.

@akien-mga
Copy link
Member

Feel free to PR your fix, it looks fine to me.

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.

3 participants