Changeset 288510 in webkit
- Timestamp:
- Jan 24, 2022, 5:55:32 PM (5 years ago)
- Location:
- branches/safari-613-branch/Source/ThirdParty/ANGLE
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
src/libANGLE/renderer/metal/ProgramMtl.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-613-branch/Source/ThirdParty/ANGLE/ChangeLog
r288508 r288510 1 2022-01-24 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r288105. rdar://problem/87656387 4 5 REGRESSION (r286603): rx::ProgramMtl::getSpecializedShader() leaks MTLFunctionConstantValues object due early return when an error occurs in ANGLE_TRY() macro 6 <https://webkit.org/b/235281> 7 <rdar://problem/87656387> 8 9 Reviewed by Darin Adler. 10 11 * src/libANGLE/renderer/metal/ProgramMtl.mm: 12 (rx::ProgramMtl::getSpecializedShader): 13 - Use mtl::AutoObjCObj<> to release MTLFunctionConstantValues 14 object on early return. 15 16 17 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288105 268f45cc-cd09-0410-ab3c-d52691b4dbfc 18 19 2022-01-17 David Kilzer <ddkilzer@apple.com> 20 21 REGRESSION (r286603): rx::ProgramMtl::getSpecializedShader() leaks MTLFunctionConstantValues object due early return when an error occurs in ANGLE_TRY() macro 22 <https://webkit.org/b/235281> 23 <rdar://problem/87656387> 24 25 Reviewed by Darin Adler. 26 27 * src/libANGLE/renderer/metal/ProgramMtl.mm: 28 (rx::ProgramMtl::getSpecializedShader): 29 - Use mtl::AutoObjCObj<> to release MTLFunctionConstantValues 30 object on early return. 31 1 32 2022-01-24 Alan Coon <alancoon@apple.com> 2 33 -
branches/safari-613-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm
r287068 r288510 590 590 mtl::TranslatedShaderInfo *translatedMslInfo = &mMslShaderTranslateInfo[shaderType]; 591 591 ProgramShaderObjVariantMtl *shaderVariant; 592 MTLFunctionConstantValues *funcConstants = nil;592 mtl::AutoObjCObj<MTLFunctionConstantValues> funcConstants; 593 593 594 594 if (shaderType == gl::ShaderType::Vertex) … … 640 640 } 641 641 642 funcConstants = [[MTLFunctionConstantValues alloc] init];642 funcConstants = mtl::adoptObjCObj([[MTLFunctionConstantValues alloc] init]); 643 643 [funcConstants setConstantValue:&emulateDiscard 644 644 type:MTLDataTypeBool … … 676 676 } 677 677 678 funcConstants = [[MTLFunctionConstantValues alloc] init];678 funcConstants = mtl::adoptObjCObj([[MTLFunctionConstantValues alloc] init]); 679 679 [funcConstants setConstantValue:&emulateCoverageMask 680 680 type:MTLDataTypeBool … … 696 696 type:MTLDataTypeBool 697 697 withName:@"ANGLEUseSampleCompareLod"]; 698 698 699 // Create Metal shader object 699 700 ANGLE_MTL_OBJC_SCOPE 700 701 { 701 702 ANGLE_TRY(CreateMslShader(context, translatedMslInfo->metalLibrary, SHADER_ENTRY_NAME, 702 funcConstants, &shaderVariant->metalShader)); 703 [funcConstants ANGLE_MTL_AUTORELEASE]; 703 funcConstants.get(), &shaderVariant->metalShader)); 704 704 } 705 705
Note:
See TracChangeset
for help on using the changeset viewer.