diff options
author | Jason Fielder <jason_apple> | 2022-03-30 21:24:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-03-30 21:31:12 +0300 |
commit | 922d53a791d53b77e5ffcf65003555fae0a0e883 (patch) | |
tree | 7804945d62f0c6366678efdffd4dffe98e5988e8 /source/blender/draw/intern/draw_manager_data.c | |
parent | 84fde382e43cff6407bfa3587fec9bd570cf9123 (diff) |
Metal: Adding alternative support for GPU_PRIM_TRI_FAN/LINE_LOOP For Metal 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
Diffstat (limited to 'source/blender/draw/intern/draw_manager_data.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index b01c901c77f..2c9ebfc080e 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -498,9 +498,13 @@ void DRW_shgroup_uniform_vec4_array_copy(DRWShadingGroup *shgroup, return; } + /* Each array element stored as an individual entry in the uniform list. + * All entries from the same array share the same base location, + * and array-size used to determine the number of elements + * copied in draw_update_uniforms. */ for (int i = 0; i < arraysize; i++) { drw_shgroup_uniform_create_ex( - shgroup, location + i, DRW_UNIFORM_FLOAT_COPY, &value[i], 0, 4, 1); + shgroup, location, DRW_UNIFORM_FLOAT_COPY, &value[i], 0, 4, arraysize); } } |