Merge branch 'blender-v4.1-release'

This commit is contained in:
Miguel Pozo
2024-02-12 18:35:31 +01:00
3 changed files with 2 additions and 31 deletions

View File

@@ -2,10 +2,6 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#ifdef GPU_ARB_gpu_shader5
# define USE_INVOC_EXT
#endif
vec4 get_pos(int v, bool backface)
{
return (backface) ? vData[v].backPosition : vData[v].frontPosition;
@@ -54,12 +50,7 @@ void main()
#endif
if (!is_manifold || !backface) {
#ifdef USE_INVOC_EXT
bool do_front = (gl_InvocationID & 1) == 0;
emit_cap(do_front, invert);
#else
emit_cap(true, invert);
emit_cap(false, invert);
#endif
}
}

View File

@@ -2,10 +2,6 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#ifdef GPU_ARB_gpu_shader5
# define USE_INVOC_EXT
#endif
#define DEGENERATE_TRIS_WORKAROUND
#define DEGENERATE_TRIS_AREA_THRESHOLD 4e-17
@@ -74,23 +70,13 @@ void main()
return;
}
#ifdef USE_INVOC_EXT
if (gl_InvocationID == 0) {
extrude_edge(backface.x);
}
else if (is_manifold) {
# ifdef DOUBLE_MANIFOLD
#ifdef DOUBLE_MANIFOLD
/* Increment/Decrement twice for manifold edges. */
extrude_edge(backface.x);
# endif
}
#else
extrude_edge(backface.x);
if (is_manifold) {
# ifdef DOUBLE_MANIFOLD
/* Increment/Decrement twice for manifold edges. */
extrude_edge(backface.x);
# endif
}
#endif
}
}

View File

@@ -668,12 +668,6 @@ struct ShaderCreateInfo {
return *(Self *)this;
}
/**
* IMPORTANT: invocations count is only used if GL_ARB_gpu_shader5 is supported. On
* implementations that do not supports it, the max_vertices will be multiplied by invocations.
* Your shader needs to account for this fact. Use `#ifdef GPU_ARB_gpu_shader5` and make a code
* path that does not rely on #gl_InvocationID.
*/
Self &geometry_layout(PrimitiveIn prim_in,
PrimitiveOut prim_out,
int max_vertices,