Skip to content

Commit

Permalink
fix memory management issue in MVKSwapchain
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAsakura authored Dec 1, 2024
1 parent 26c7b02 commit 3b77dea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MoltenVK/MoltenVK/GPUObjects/MVKSwapchain.mm
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ static inline CIE1931XY VkXYColorEXTToCIE1931XY(VkXYColorEXT xy) {
colorVol.min_display_mastering_luminance = OSSwapHostToBigInt32((uint32_t)(metadata.minLuminance * 10000));
lightLevel.max_content_light_level = OSSwapHostToBigInt16((uint16_t)metadata.maxContentLightLevel);
lightLevel.max_pic_average_light_level = OSSwapHostToBigInt16((uint16_t)metadata.maxFrameAverageLightLevel);
NSData* colorVolData = [NSData dataWithBytes: &colorVol length: sizeof(colorVol)];
NSData* lightLevelData = [NSData dataWithBytes: &lightLevel length: sizeof(lightLevel)];
NSData* colorVolData = [[NSData alloc] initWithBytes: &colorVol length: sizeof(colorVol)];
NSData* lightLevelData = [[NSData alloc] initWithBytes: &lightLevel length: sizeof(lightLevel)];
CAEDRMetadata* caMetadata = [CAEDRMetadata HDR10MetadataWithDisplayInfo: colorVolData
contentInfo: lightLevelData
opticalOutputScale: 1];
Expand Down

0 comments on commit 3b77dea

Please sign in to comment.