Age | Commit message (Collapse) | Author |
|
Also solves two warnings from the previous similar commit,
f688e3cc3130e70e77f0bb0. The change to the grease pencil
modifier is quite suspicious, but doesn't change the behavior,
which was already broken.
|
|
|
|
This was introduced by rBeccb0b222e3465baa71430223c5ee2f0206a7b02.
|
|
This function was not used for anything other than mat4. This
was because of a limitation of the DRW module/
This makes it cleaner for the GLSL and also less tempting to use
it for other unconventional purpose.
|
|
This was caused by the recent changes made to the way we handle matrix
copies. The matrix copy assumed that the uniform iteration was the same
as creation order. But this was far from true. The reality was that
the iterator was reverse for `unichunk` but not for `unichunk->uniforms`
so this was recreating wrong matrix.
I rewrote this part to always use reverse iteration and fix the
copy destination.
Also I simplified the code making the assumption this won't be used for
anything else than mat4.
|
|
Simple error in an earlier commit, the flags should be or-ed.
|
|
|
|
|
|
Also change some remaining cases of "hair object" to "curves object".
|
|
backend.
- Metal uniform array compatibility in DRW module.
- Guard OpenGL-specific workarounds and flushes behind GPU_type_matches_ex API guard. Add further render boundaries for render paths called outside of the main loop.
Authored by Apple: Michael Parkin-White
Ref: T96261
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D14438
|
|
MSL does not have an implicit global scope, this is emulated via macro's adding an indirection for uniforms, attributes, shader stage inputs and outputs such as:
#define roughness shaderinst->roughness.
Variables in GLSL which exist within uniform blocks can be directly referenced via the global scope, unlike standard C++. This means that variable name pollution occurs if subsequent local variables in the code use the same name, resulting in compilation errors.
A number of these conflicting names have been renamed to ensure unique naming and no further scope pollution.
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14452
|
|
Explicit constructor for mat3 from a mat4 is not valid and cannot be overloaded.
Adding explicit texture resource type flags for depth textures. This is an explicit requirement for Metal Shading language. This is a temporary compatibility, as this path is already supported in GPU_SHADER_CREATE_INFO under ImageType::DEPTH_2D, though required in shader source for MSL shaders which do not have create info.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14418
|
|
The crash happens because the origindex layers created as part of
the modifier stack evaluation are not set in the `MeshRenderData` when
they should have been.
This is because when selecting in X-ray mode, a subdivision wrapper
is created to ensure that selection happens with a subdivided
geometry, and this replaces the `MDATA` wrapper which is also used to
setup the `MeshRenderData`.
As we do not seemingly have an `MDATA` wrapper, the draw code decides
that we can extract draw buffers directly from the BMesh, instead of
the mapped Mesh with origin indices layers.
To fix this, we should also consider to use mapped extraction if a
subdivision wrapper exists on the mesh.
Differential Revision: https://developer.blender.org/D14485
|
|
Should have no regression.
|
|
This should have no regression.
|
|
# Conflicts:
# source/blender/draw/intern/draw_common_shader_shared.h
# source/blender/draw/intern/shaders/draw_view_info.hh
|
|
The lines paint mask IBO extraction was not implemented for GPU subdivision.
For it to work, we also now need to preserve the subdivision loop to
subdivision edge map, which until now was overwritten to store coarse edges
(the map to coarse edges is still preserved).
Also the paint flag stored in the 4th dimension of the loop normal buffer
was not properly set for flat shaded faces, leading to other kind of
artefacts and render issues.
|
|
|
|
A follow-up to e253f9f66d6f. Follow the policy from T85728
completely (using "num" as a prefix) and rename another function.
|
|
Follow conventions from T85728.
|
|
|
|
|
|
Each time the user clicks the viewport 2 sets of engine views are
created. Each set is currently composed of 8 view objects, each of size
592 bytes.
Because space is not reserved in the vector that holds them, several
unnecessary re-allocation/copy cycles occur as the vector resizes and
the total allocation load is 8880 bytes. This happens twice.
Reduce to just the allocations necessary and with exactly 4736 bytes
allocated for each set
- Before: 8 allocations and 8 deallocations totaling 17760 bytes
- After: 2 allocations and 2 deallocations totaling 9472 bytes
Reviewed By: fclem, jbakker
Differential Revision: https://developer.blender.org/D13782
|
|
Rename "size" variables and functions to use "num" instead,
based on T85728 (though this doesn't apply to simple C++
containers, it applies here). Rename "range" to "points" in
some functions, so be more specific.
Differential Revision: https://developer.blender.org/D14431
|
|
|
|
For render image buffers to be acquired, a lock must be provided. Also
fixed wrong usage of release, it must always be called regardless if the
returned image buffer is NULL.
|
|
|
|
Vertices were not drawn properly as the logic for mapped mesh was used
in the BMesh case.
Edge display would ignore subdivided edges which would come from coarse
edges when setting display flags.
|
|
|
|
|
|
Metal shading language follows the C++ 14 standard and in some cases requires a greater level of explicitness than GLSL. There are also some small language differences:
- Explicit type-casts (C++ requirements)
- Explicit constant values (C++ requirements, e.g. floating point values using 0.0 instead of 0).
- Metal/OpenGL compatibility paths
- GLSL Function prototypes
- Explicit accessors for vector types when sampling textures.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14378
|
|
Nested ? : get better formatted with some parenthesis around the expressions.
|
|
|
|
This patch fixes T96655, bloom crashing Eevee.
The error occurs because rB472fc0c55848b2e2d428cfb4f7debb80a4e12081 added `vec3 safe_color(vec3 c)` to `common_math_lib.glsl`.
However, `vec3 safe_color(vec3 c)` already exists in `effect_bloom_frag.glsl`.
This means `vec3 safe_color(vec3 c)` is duplicated within `common_math_lib.glsl` and `effect_bloom_frag.glsl`.
{F12938060 size=full}
The duplicate code in `effect_bloom_frag.glsl` can be removed since it's no longer needed.
(I checked the remaining methods, there shouldn't be any additional duplicate code)
Reviewed By: fclem
Maniphest Tasks: T96655
Differential Revision: https://developer.blender.org/D14396
|
|
This was a use-after-free bug due to dangling pointers.
|
|
This is quite a huge cleanup. Making use of the `common_gpencil_lib.glsl`
to share more codes and use more consistent codestyle.
The gpencil engine specifics are now out of the `gpencil_vertex()`
function making it easier to add more features.
There should be no regression as all workarounds are kept as is.
|
|
Mostly quality of life functions and macros.
|
|
# Conflicts:
# source/blender/draw/intern/draw_manager.h
# source/blender/draw/intern/draw_manager_exec.c
# source/blender/draw/intern/draw_shader_shared.h
|
|
This library contains the needed functions to render GPencil object
geometry. Centralizing these will make it possible for other draw
engines (EEVEE, Overlay) to reuse the same vertex shader code and
possibly the same fragment rejection methods.
|
|
Simple port. Shouldn't break anything.
|
|
Simple port. Shouldn't break anything.
|
|
Simple port. Shouldn't break anything.
|
|
This adds a simple and more manageable temp texture behavior.
The texture is garanteed to be available only between the acquire/release pair.
This makes the same engine able to reuse the textures and even overlap the acquire
& release calls.
|
|
- Add name support to storage buffers
- Delete view functions for TextureFromPool
- Add support for different size acquire and assert on mulitple acquire
- Allow multiple release
|
|
This reverts commit 33409f9f1cd42e899f2706fe7878e5e89b50d617, as it breaks
panning in the image editor.
Fixes T96543
|
|
|
|
This is useful to read/write to the textures directly using compute
shaders and imageLoad/Store.
|
|
|
|
|
|
This just expose the GPU API through DRW.
|