Age | Commit message (Collapse) | Author |
|
A Bump node without a Height input is meaningless and does nothing.
As such, it is available as an old workaround that allows making Node
Group inputs that default to normal when not connected, by routing
via a no-op Bump node before doing math.
Cycles specifically recognizes this use case and either bypasses
the node, or converts it into a Geometry Normal node, but Eevee
was still evaluating it as usual. That incurred performance cost,
and also normalized the vector unlike Cycles.
This implements the same bypass logic for Eevee. Since I'm not
sure if it's possible to totally remove the node at this stage,
it emits a no-op function call to copy the input vector.
Differential Revision: https://developer.blender.org/D14045
|
|
|
|
|
|
|
|
|
|
|
|
This was caused by rB3a90f93507a344d2b6eb3ae631371348ff977047
|
|
As of now we do not allow additional infos duplication. We could in the future
but for now assert that this is not the case.
|
|
|
|
To avoid that, we simply filter using a debug group.
|
|
This is then easier to include in other modules.
|
|
|
|
|
|
|
|
This might head lead to a crash when a shader uses both ubo and ssbo.
|
|
- Fix image.format conversion to string
- Fix warnings about ARB_conservative_depth not found even if GL > 4.2
- Add `array(type)` define for portable array definition
|
|
Thanks to the new `ShaderCreateInfo` we now include source files without
any modification. This let us query which are the source files passed to the
`print_log` function. The log will now include a file with row and column
number which is interpreted as a link in most IDE.
DEBUG_CONTEXT_LINES will add more lines around the error lines for more
context. This is also useful if the error line is imprecise (because of
driver bugs) and the reported line is not sufficient to know the location
of the error.
The DEBUG_DEPENDENCIES option will display the list of included files in
the shader sources. Note that it will not print generated source.
This commit also fixes some issues with unhelpful logs, bogus row & column
numbers, other error format, and bug if row was 0.
|
|
Source files are now only referenced and listed for the driver to ingest.
Shader sources now includes generated data if any.
Also cleans up gpu_shader_dependency_get_builtins casts.
|
|
|
|
This is needed by eevee-rewrite
|
|
This includes multiple commits:
- Fix crash when using std::cerr for error output
- Add auto_resource_location which overrides all resources location (not vert input)
- Improve codestyle of error reporting.
- Add type conversion to string and to `eGPUType`
- Add comparison operator (will be used for hash collision resolution).
- Add members related to generated code (codegen)
|
|
This will be useful when compute shader will be used more.
Refer to the opengl documentation for their meaning.
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glMemoryBarrier.xhtml
|
|
|
|
Detected on `amdgpu-pro` libGL implementation. The workaround is to not
use explicit location for vertex attributes. This is not a real problem
as we don't rely on them for now.
|
|
This was caused by macros interpreted as recursive. Workaround by
not using macros at all and just define local variables which
hopefully will be optimized.
|
|
This was caused by macros interpreted as recursive. Workaround by
not using macros at all and just define local variables which
hopefully will be optimized.
|
|
Braces missed in b73d3b80fdcb72446
|
|
|
|
|
|
Bypassing the defines which are only there for error checking.
|
|
Using opt-in instead of opt-out to make code easier to read.
Add combined flag enum.
Making restrict an inverse flag option because it is so rare to
use it.
|
|
This adds the possibility to use the `gpu_BaryCoord[NoPersp]`
builtin to support barycentric coordinates without geometry shader.
The `BuiltinBits::LAYER` builtin needs to be manually added
to the `GPUShaderCreateInfo` in order to use this feature.
Note: This is only available for shaders using `GPUShaderCreateInfo`.
A geometry shader fallback is generated if the extension
`AMD_shader_explicit_vertex_parameter` is not available.
`NV_fragment_shader_barycentric` was not considered because it is not
present inside the `glew.h` with use and seems to only be available
with vulkan.
|
|
This adds the possibility to use the `gpu_Layer` builtin to
support layered rendering without geometry shader.
The `BuiltinBits::LAYER` builtin needs to be manually added
to the `GPUShaderCreateInfo` in order to use this feature.
Note: This is only available for shaders using `GPUShaderCreateInfo`.
A geometry shader fallback is generated if the extension
`AMD_shader_explicit_vertex_parameter` is not available.
|
|
- Scan all static shaders for builtins on startup.
- Add possibility to manually add builtins.
- `ShaderCreateInfo.builtins_` contain builtins from all stages.
|
|
This allows to check if a create_info extists based on its name.
|
|
|
|
Missing include statements of the gpu_shader_colorspace_lib.glsl in
various shaders ignored the target texture color space.
|
|
- Remove outdated references to glReadPixels & OpenGL.
- Rename GPUPickState.{gl => gpu}
- Add doc-string for MAXPICKELEMS.
- Use doxygen comments & other minor doc-string improvements.
|
|
GPU_select originally used GL_SELECT which defined the format for
storing the selection result.
Now this is no longer the case, define our own struct - making the code
easier to follow:
- Avoid having to deal with arrays in both `uint*` and `uint(*)[4]`
multiplying offsets by 4 in some cases & not others.
- No magic numbers for the offsets of depth & selection-ID.
- No need to allocate unused members to match GL_SELECT
(halving the buffer size).
|
|
|
|
|
|
|
|
The GLSL defines used to make the uniform names unusable for local variable
is being interpreted as recursive on some implementation.
This avoids it by create a second macro avoiding the recursion.
|
|
|
|
Silence Clang-tidy warnings in gpu module.
|
|
Ported the image engine shaders to use the GPUShaderCreateInfo struct.
No functional changes.
|
|
Also minor white-space & case changes.
|
|
Also minor wording improvements.
|
|
This is to avoid being flooded with compilation errors that are not helpful.
|
|
It came to light that there is no error checking when trying to read
a framebuffer plane without anything attached to it.
|