RESOLVED WONTFIX 199087
[WHLSL] Struct argument to reference resource binding crashes MSL generator
https://bugs.webkit.org/show_bug.cgi?id=199087
Summary [WHLSL] Struct argument to reference resource binding crashes MSL generator
Justin Fan
Reported 2019-06-20 16:07:07 PDT
This WHLSL code: struct Args { device int[] result : register(u0); } [numthreads(1, 1, 1)] compute void _compute_main(Args args) { args.result[0] = 42; } causes the below crash in the MSL generator. #0 0x00000004d9e7f555 in std::__1::unique_ptr<WebCore::WHLSL::Metal::BaseTypeNameNode, std::__1::default_delete<WebCore::WHLSL::Metal::BaseTypeNameNode> >::operator bool() const at /Volumes/Xcode11M326j_m18A391011_m19A489_i17A510_t17J503_w17R509_b17P484_FastSim_Boost_42GB/Xcode.app/Contents/Developer/Toolchains/OSX10.15.xctoolchain/usr/include/c++/v1/memory:2637 #1 0x00000004d9e672cd in WTF::UniqueRef<WebCore::WHLSL::Metal::BaseTypeNameNode>::operator WebCore::WHLSL::Metal::BaseTypeNameNode&() at /Volumes/Data/Projects/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/UniqueRef.h:60 #2 0x00000004d9e64640 in WebCore::WHLSL::Metal::find(WebCore::WHLSL::AST::UnnamedType&, WTF::Vector<WTF::UniqueRef<WebCore::WHLSL::Metal::BaseTypeNameNode>, 0ul, WTF::CrashOnOverflow, 16ul>&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:208 #3 0x00000004d9e67012 in WebCore::WHLSL::Metal::TypeNamer::mangledNameForType(WebCore::WHLSL::AST::UnnamedType&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:457 #4 0x00000004d9e1c567 in WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit(WebCore::WHLSL::AST::FunctionDeclaration&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:74 #5 0x00000004d9e29ca7 in WebCore::WHLSL::Metal::sharedMetalFunctions(WebCore::WHLSL::Program&, WebCore::WHLSL::Metal::TypeNamer&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:778 #6 0x00000004d9e29f80 in WebCore::WHLSL::Metal::metalFunctions(WebCore::WHLSL::Program&, WebCore::WHLSL::Metal::TypeNamer&, WebCore::WHLSL::MatchedComputeSemantics&&, WTF::Vector<WebCore::WHLSL::BindGroup, 0ul, WTF::CrashOnOverflow, 16ul>&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:816 #7 0x00000004d9e2a613 in WebCore::WHLSL::Metal::generateMetalCode(WebCore::WHLSL::Program&, WebCore::WHLSL::MatchedComputeSemantics&&, WTF::Vector<WebCore::WHLSL::BindGroup, 0ul, WTF::CrashOnOverflow, 16ul>&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:81 #8 0x00000004d9d919b9 in WebCore::WHLSL::prepare(WTF::String&, WebCore::WHLSL::ComputePipelineDescriptor&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp:186 #9 0x00000004d87ede1e in WebCore::trySetFunctions(char const*, WebCore::GPUPipelineStageDescriptor const&, WebCore::GPUDevice const&, MTLComputePipelineDescriptor*, WTF::Optional<WebCore::WHLSL::ComputePipelineDescriptor>&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:85 #10 0x00000004d87ed2ba in WebCore::convertComputePipelineDescriptor(char const*, WebCore::GPUComputePipelineDescriptor const&, WebCore::GPUDevice const&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:149 #11 0x00000004d87e6af3 in WebCore::tryCreateMTLComputePipelineState(char const*, WebCore::GPUDevice const&, WebCore::GPUComputePipelineDescriptor const&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:166 #12 0x00000004d87e68ff in WebCore::GPUComputePipeline::tryCreate(WebCore::GPUDevice const&, WebCore::GPUComputePipelineDescriptor const&) at /Volumes/Data/Projects/WebKit/OpenSource/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:192
Attachments
Myles C. Maxfield
Comment 1 2020-05-05 00:42:29 PDT
WHLSL is no longer relevant.
Note You need to log in before you can comment on or make changes to this bug.