[webkit-reviews] review granted: [Bug 195771] [WHLSL] Implement zero-filling of types : [Attachment 371047] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 5 10:01:44 PDT 2019


Myles C. Maxfield <mmaxfield at apple.com> has granted  review:
Bug 195771: [WHLSL] Implement zero-filling of types
https://bugs.webkit.org/show_bug.cgi?id=195771

Attachment 371047: patch

https://bugs.webkit.org/attachment.cgi?id=371047&action=review




--- Comment #5 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 371047
  --> https://bugs.webkit.org/attachment.cgi?id=371047
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371047&action=review

Does the Metal compiler still produce warnings now? GPURenderPipelineMetal.mm
has a FIXME with a link to this bug.

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:54
> +	   // Skip argument declarations.

Cool.

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:66
> +	   printStream.print(TypeDumper(*type));

🤔 This seems unwise, though I do understand how it isn't observable. Are you
confident this is a good idea?

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:-360
> -	   auto* overload = resolveFunctionOverloadImpl(*getterFuncs,
argumentTypeReferences, nullptr);

Excellent.

> Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:73
> +    void setInitializer(UniqueRef<Expression> expression)

Doesn't this need to take an rvalue reference? UniqueRef is move-only (I
think???)

> Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:453
>	  
m_stringBuilder.append(makeString(m_typeNamer.mangledNameForType(*variableDecla
ration.type()), ' ', variableName, ";\n"));

Is this dead code now?

> Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:110
> +	       stringBuilder.append(makeString("    for (size_t i = 0; i <
sizeof(", metalReturnName, "); ++i) {\n"));
> +	       stringBuilder.append("	     ptr[i] = 0;\n");
> +	       stringBuilder.append("	 }\n");

Can we remove the { } and pull it up into one line?


More information about the webkit-reviews mailing list