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

Running --doctool results in error message: ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. #88990

Closed
Calinou opened this issue Feb 28, 2024 · 2 comments · Fixed by #88996

Comments

@Calinou
Copy link
Member

Calinou commented Feb 28, 2024

Tested versions

  • Reproducible in: 4.3.dev f6aabd2 and later
  • Not reproducible in: 4.2.1.stable, 4.3.dev3

System information

Godot v4.3.dev (f6aabd2) - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Running --doctool always results in these 6 error messages:

ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)
ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)
ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)
ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)
ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)
ERROR: Condition "actions.default_repeat == ShaderLanguage::REPEAT_DEFAULT" is true. Returning: String()
   at: _get_sampler_name (./servers/rendering/shader_compiler.cpp:283)

Despite this, --doctool generates correct output.

I bisected the regression to f6aabd2. cc @jsjtxietian

We might want to look into detecting this on CI, perhaps with a CLI argument that makes Godot exit with a non-zero exit code (but continue running as normal) if any error is printed during its run. This would also help with #83042.

Steps to reproduce

Run a Godot editor binary with the --doctool command line argument.

Minimal reproduction project (MRP)

N/A

@clayjohn
Copy link
Member

Looks like it is now running this block when it didn't run it before:

if (correct_texture_uniform && !RS::get_singleton()->is_low_end()) {

That being said, there is no reason this should fail.

An easy workaround might be to assign the default_repeat value when creating the actions here:
https://github.com/godotengine/godot/blob/df78c0636d79c9545a283e0e2a926d623998cc27/servers/rendering/dummy/storage/material_storage.cpp#L39C18-L39C41

@clayjohn
Copy link
Member

Actually, looks like this is a regression from #88021 originally. It sets the default to REPEAT_DEFAULT here:

ShaderLanguage::TextureFilter default_filter = ShaderLanguage::TextureFilter::FILTER_DEFAULT;
ShaderLanguage::TextureRepeat default_repeat = ShaderLanguage::TextureRepeat::REPEAT_DEFAULT;

Since REPEAT_DEFAULT is never a valid setting, it needs to be changed when actions is initialized.

I would change the lines to:

ShaderLanguage::TextureFilter default_filter = ShaderLanguage::TextureFilter::FILTER_NEAREST; 
ShaderLanguage::TextureRepeat default_repeat = ShaderLanguage::TextureRepeat::REPEAT_DISABLE; 

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.

2 participants