[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
authorjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 01:35:01 +0000 (01:35 +0000)
committerjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 01:35:01 +0000 (01:35 +0000)
commit78a547cd66812dabe51fe8b9416759013bc5d1e2
tree3fa8373974657dc94ce0218dd723aa513ef0486f
parent12df665aef68ba3821618c7595d5e93b80f8921d
[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
https://bugs.webkit.org/show_bug.cgi?id=193473

Reviewed by Dean Jackson and Myles Maxfield.

Source/WebCore:

Also, switch to using the inputSlot instead of the shaderLocation field, as this seems more correct.
As of now I cannot determine an analog for WebGPU's shaderLocation in Metal.

Test: Covered by vertex-buffer-triangle-strip.html. No change in behavior.

* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor): Use the inputSlot instead of shaderLocation as bufferIndex.

LayoutTests:

Refactor the vertex shader to use the vertex stage input, rather than buffer resources.

* webgpu/vertex-buffer-triangle-strip.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webgpu/vertex-buffer-triangle-strip.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm