WebKit Bugzilla
Attachment 371093 Details for
Bug 198433
: [WHLSL] Zero-fill parameters to entry point functions or make any mismatch a compile error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
patch.diff (text/plain), 1.38 KB, created by
Saam Barati
on 2019-05-31 15:48:09 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2019-05-31 15:48:09 PDT
Size:
1.38 KB
patch
obsolete
>Index: Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp >=================================================================== >--- Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp (revision 245951) >+++ Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp (working copy) >@@ -248,8 +248,14 @@ String EntryPointScaffolding::mangledOut > String EntryPointScaffolding::unpackResourcesAndNamedBuiltIns() > { > StringBuilder stringBuilder; >- for (size_t i = 0; i < m_functionDefinition.parameters().size(); ++i) >- stringBuilder.append(makeString(m_typeNamer.mangledNameForType(*m_functionDefinition.parameters()[i]->type()), ' ', m_parameterVariables[i], ";\n")); >+ for (size_t i = 0; i < m_functionDefinition.parameters().size(); ++i) { >+ auto typeName = m_typeNamer.mangledNameForType(*m_functionDefinition.parameters()[i]->type()); >+ stringBuilder.append(makeString(typeName, ' ', m_parameterVariables[i], ";\n")); >+ stringBuilder.append(makeString("for (size_t i = 0; i < sizeof(", typeName, "); ++i) {\n")); >+ stringBuilder.append(makeString(" static_cast<thread char*>(static_cast<thread void*>(&", m_parameterVariables[i], "))[i] = 0;\n")); >+ stringBuilder.append("}\n"); >+ } > > for (size_t i = 0; i < m_layout.size(); ++i) { > auto variableName = m_namedBindGroups[i].variableName;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198433
:
371093
|
372620