Skip to content

Conversation

@Akemi
Copy link
Member

@Akemi Akemi commented Nov 8, 2025

this makes debugging and finding problems easier. since we have a vulkan to metal mapping layer (MoltenVK, mesa, any kind of vulkan macOS driver) we don't actually know what is set or if it is properly set/mapped.

actually log the important metal layer states to be sure everything is properly set up.

only the 9 allowed pixel formats(https://developer.apple.com/documentation/quartzcore/cametallayer/pixelformat) on the metal layer were actually mapped with a name in the enum extension. without the mapping it would only print a plain int value.

for the colorspace i did some string manipulation to get an actual name/description and the corresponding swift constant name instead of the convoluted obj-c representations, example:

kCGColorSpaceSRGB > SRGB (sRGB IEC61966-2.1)
kCGColorSpaceITUR_2100_PQ  > ITUR_2100_PQ (Rec. ITU-R BT.2100 PQ)

since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which pixel format is used/mapped to.

log pixel format changes to actually see which format was chosen. only
those 9 formats are valid for a CAMetalLayer.
https://developer.apple.com/documentation/quartzcore/cametallayer/pixelformat
@Akemi Akemi force-pushed the mac_layer_logging branch 2 times, most recently from 7c4b3c0 to a777004 Compare November 8, 2025 15:58
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which colorspace is used/mapped to.

log colorspace changes to actually see which colorspace was chosen.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which EDR data is used/mapped to.

log EDR data changes to actually see which EDR data was chosen.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when HDR is activated

log HDR active state.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when display sync is activated

log display sync active state.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when the layer is opaque and direct-to-display is
possible.

log opaque state.
@Akemi Akemi force-pushed the mac_layer_logging branch from a777004 to 69ce287 Compare November 15, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant