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/gpu/shaders | |
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/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_2D_image_rect_vert.glsl | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_image_rect_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_image_rect_vert.glsl index 903c602c5d6..11bb311740c 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_image_rect_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_image_rect_vert.glsl @@ -16,14 +16,6 @@ void main() vec2 uv; vec2 co; -#ifdef GPU_METAL -/* Metal API does not support Triangle fan primitive topology. - * When this shader is called using Triangle-Strip, vertex ID's - * are in a different order. */ -# define GPU_PRIM_TRI_STRIP -#endif - -#ifdef GPU_PRIM_TRI_STRIP if (gl_VertexID == 0) { co = rect_geom.xw; uv = rect_icon.xw; @@ -40,24 +32,6 @@ void main() co = rect_geom.zy; uv = rect_icon.zy; } -#else - if (gl_VertexID == 0) { - co = rect_geom.xy; - uv = rect_icon.xy; - } - else if (gl_VertexID == 1) { - co = rect_geom.xw; - uv = rect_icon.xw; - } - else if (gl_VertexID == 2) { - co = rect_geom.zw; - uv = rect_icon.zw; - } - else { - co = rect_geom.zy; - uv = rect_icon.zy; - } -#endif gl_Position = ModelViewProjectionMatrix * vec4(co, 0.0f, 1.0f); texCoord_interp = uv; |