Bug 193473 - [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
Summary: [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-15 17:09 PST by Justin Fan
Modified: 2019-01-16 17:35 PST (History)
9 users (show)

See Also:


Attachments
Patch (4.21 KB, patch)
2019-01-15 17:16 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (3.46 KB, patch)
2019-01-16 13:33 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch for landing (3.67 KB, patch)
2019-01-16 16:56 PST, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2019-01-15 17:09:26 PST
[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
Comment 1 Justin Fan 2019-01-15 17:16:43 PST
Created attachment 359231 [details]
Patch
Comment 2 Darin Adler 2019-01-15 17:20:31 PST
Comment on attachment 359231 [details]
Patch

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

> Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:138
> +        // FIXME: Setting bufferIndex to an index that DNE causes a SIGABRT when calling [MTLDevice newRenderPipelineStateWithDescriptor]
> +        // that is not caught by BLOCK_OBJC_EXCEPTIONS.

I don’t think "DNE" is standard terminology. Writing out "does not exist" or "is out of bounds" would be clearer.

But this FIXME comment is not very clear. What does the comment mean? It seems to be an interesting bit of trivia; what should we be fixing?

It’s like a comment saying "// FIXME: Dereferencing a null pointer causes a SIGABRT that is not caught by BLOCK_OBJC_EXCEPTIONS." True, but how exactly is this relevant to the next line of code? Is it possible that inputSlot is an index that does not exist? If so, what can we do about it?
Comment 3 Simon Fraser (smfr) 2019-01-15 18:02:40 PST
Comment on attachment 359231 [details]
Patch

This patch has too many FIXMEs.
Comment 4 Justin Fan 2019-01-16 11:28:17 PST
Thanks for the comments! Instead of writing  in fixmes I'll create a new bug to address the issues I raised for myself.
Comment 5 Radar WebKit Bug Importer 2019-01-16 12:42:28 PST
<rdar://problem/47326063>
Comment 6 Justin Fan 2019-01-16 13:33:01 PST
Created attachment 359297 [details]
Patch
Comment 7 Dean Jackson 2019-01-16 16:28:55 PST
Comment on attachment 359297 [details]
Patch

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

> Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:137
> -        mtlAttributeDesc.bufferIndex = attributes[i].shaderLocation;
> +        mtlAttributeDesc.bufferIndex = attributes[i].inputSlot;

You don't mention why you made this change. The bug title only mentions the HTML. What was wrong about it?

> LayoutTests/webgpu/vertex-buffer-triangle-strip.html:17
> +    float4 position [[attribute(0)]];

Can you label with both attribute(0) and position to avoid having two identical structs?
Comment 8 Myles C. Maxfield 2019-01-16 16:31:39 PST
Comment on attachment 359297 [details]
Patch

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

> LayoutTests/webgpu/vertex-buffer-triangle-strip.html:32
> +fragment float4 fragment_main(VertexOut v [[stage_in]])

Does this need to take any arguments at all?
Comment 9 Justin Fan 2019-01-16 16:56:09 PST
Created attachment 359336 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2019-01-16 17:35:08 PST
Comment on attachment 359336 [details]
Patch for landing

Clearing flags on attachment: 359336

Committed r240101: <https://trac.webkit.org/changeset/240101>
Comment 11 WebKit Commit Bot 2019-01-16 17:35:09 PST
All reviewed patches have been landed.  Closing bug.