Rewrite overlay support in Metal renderer to avoid additional subviews

Subviews cause our Metal layer to fall out of the direct composition path on Intel hardware
This commit is contained in:
Cameron Gutman 2024-02-11 00:11:23 -06:00
commit 8959ddbeb6
2 changed files with 140 additions and 72 deletions

View file

@ -33,3 +33,9 @@ fragment float4 ps_draw_biplanar(Vertex v [[ stage_in ]],
rgb.b = dot(yuv, cscParams.matrix[2]);
return float4(rgb, 1.0f);
}
fragment float4 ps_draw_rgb(Vertex v [[ stage_in ]],
texture2d<float> rgbTexture [[ texture(0) ]])
{
return rgbTexture.sample(s, v.texCoords);
}