Skip to content

Commit

Permalink
[WebGPU] Avoid warnings due to deprecation
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266818
<radar://120051511>

Unreviewed warning deprecation supression.

* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::createSimplePso):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::ShaderModule::createLibrary):

Canonical link: https://commits.webkit.org/272460@main
  • Loading branch information
mwyrzykowski committed Dec 22, 2023
1 parent 519d5e9 commit 9c0e63b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/WebGPU/WebGPU/CommandEncoder.mm
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ static MTLStoreAction storeAction(WGPUStoreOp storeOp)
{
MTLRenderPipelineDescriptor* mtlRenderPipelineDescriptor = [MTLRenderPipelineDescriptor new];
MTLCompileOptions* options = [MTLCompileOptions new];
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
options.fastMathEnabled = YES;
ALLOW_DEPRECATED_DECLARATIONS_END

NSUInteger sampleCount = 0;
MTLDepthStencilDescriptor *depthStencilDescriptor = nil;
Expand Down
2 changes: 2 additions & 0 deletions Source/WebGPU/WebGPU/ShaderModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@
id<MTLLibrary> ShaderModule::createLibrary(id<MTLDevice> device, const String& msl, String&& label)
{
auto options = [MTLCompileOptions new];
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
options.fastMathEnabled = YES;
ALLOW_DEPRECATED_DECLARATIONS_END
NSError *error = nil;
// FIXME(PERFORMANCE): Run the asynchronous version of this
id<MTLLibrary> library = [device newLibraryWithSource:msl options:options error:&error];
Expand Down

0 comments on commit 9c0e63b

Please sign in to comment.