Is there an explanation why "Capture GPU Frame" reports this fragment shader uses Float instead of Half instructions.
The Pipeline Statistics, Remarks pane reports:
Fragment shader is rendering to CAMetalLayer Display Drawable, 1920x1080 BGRA8Unorm
Apple TV 4K
tvOS 13.4.6 (17L570)
Xcode 11.5 (11E608c)
MacOS 10.15.5 (19F101)
Code Block Metal fragment half4 texturedQuadFragment/*ConstantColorNoParameters*/() { METAL_CONST half4 color={0.5h,0.25h,0.75h,1.0h}; return color; }
The Pipeline Statistics, Remarks pane reports:
High Float-to-Half Ratio
A relatively high amount of floating-point operations use 32-bit float data types
Instead, use 16-bit half data types to increase performance.
Ratio is 100.0% - TextureQuadShader.metal:texturedQuadFragmentMultiline
Performance, Counters, Fragment Shader reports:Total Number of Instructions 4
Assembly listing doesn't indicate Float usage:FS ALU Instructions, 4,216,440
FS ALU Float Instructions, 98.5%
FS ALU Half Instructions, 1.51%
Code Block define <4 x half> @texturedQuadFragment() local_unnamed_addr #0 { ret <4 x half> <half 0xH3800, half 0xH3400, half 0xH3A00, half 0xH3C00> }
Fragment shader is rendering to CAMetalLayer Display Drawable, 1920x1080 BGRA8Unorm
Apple TV 4K
tvOS 13.4.6 (17L570)
Xcode 11.5 (11E608c)
MacOS 10.15.5 (19F101)