godotengine / godotengine/godot

'MODE_COPY_SECTION_SOURCE': undeclared identifier in copy_effects.cpp when build the project

Open
#87,289 1 comment 0 reactions 0 assignees View on GitHub
bug topic:rendering
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`

![image](https://github.com/godotengine/godot/assets/8315986/e60fd46f-4c65-46cd-b0cd-a7ba9a033ba4)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.