godotengine / godotengine/godot
'MODE_COPY_SECTION_SOURCE': undeclared identifier in copy_effects.cpp when build the project
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Current master
### System information
Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
### Issue description
When build the project, I got `MODE_COPY_SECTION_SOURCE : undeclared identifier in drivers\gles3\effects\copy_effects.cpp`

It looks like in certain cases the `copy.glsl.gen.h` did not generate the definition for `MODE_COPY_SECTION_SOURCE`
```
enum Uniforms {
COPY_SECTION,
SOURCE_SECTION,
COLOR_IN,
PIXEL_SIZE,
};
enum ShaderVariant {
MODE_DEFAULT,
MODE_COPY_SECTION,
MODE_GAUSSIAN_BLUR,
MODE_MIPMAP,
MODE_SIMPLE_COLOR,
MODE_CUBE_TO_OCTAHEDRAL,
};
```
Is there any way to debug this?
### Steps to reproduce
Not sure how I get there, but **I checked out to an old branch and rebased it to master** before I encountered this error. Maybe there is some unsync problem here? Also I can make sure that I did not have any local git changes in my repo.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Start with drivers/gles3/effects/copy_effects.cpp and the generated copy.glsl.gen.h mentioned in the report. Reproduce the build after checking out and rebasing the branch, then inspect why MODE_COPY_SECTION_SOURCE is missing from the generated header. Done means the header contains the required definition and the project builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100