WebKit Bugzilla
Attachment 359231 Details for
Bug 193473
: [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193473-20190115171638.patch (text/plain), 4.21 KB, created by
Justin Fan
on 2019-01-15 17:16:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2019-01-15 17:16:43 PST
Size:
4.21 KB
patch
obsolete
>Subversion Revision: 240019 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e00d3145c707897b692f580be3269ab6d189ed48..3bb1405e7ebcfabeb8ddbfcc79102568ef995528 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-01-15 Justin Fan <justin_fan@apple.com> >+ >+ [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer >+ https://bugs.webkit.org/show_bug.cgi?id=193473 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ > 2019-01-15 Myles C. Maxfield <mmaxfield@apple.com> > > [WHLSL] Implement the loop checker >diff --git a/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm b/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >index 79ae926914a7d5e747209a068b05cad91a4e7599..cd709f7ff241b1254c714c4f592a76a02627ac64 100644 >--- a/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >+++ b/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >@@ -134,8 +134,11 @@ static bool setInputStateForPipelineDescriptor(const char* const functionName, M > MTLVertexAttributeDescriptor *mtlAttributeDesc = [attributeArray objectAtIndexedSubscript:i]; > mtlAttributeDesc.format = *mtlFormat; > mtlAttributeDesc.offset = attributes[i].offset; >- mtlAttributeDesc.bufferIndex = attributes[i].shaderLocation; >+ // FIXME: Setting bufferIndex to an index that DNE causes a SIGABRT when calling [MTLDevice newRenderPipelineStateWithDescriptor] >+ // that is not caught by BLOCK_OBJC_EXCEPTIONS. >+ mtlAttributeDesc.bufferIndex = attributes[i].inputSlot; > [mtlVertexDescriptor.get().attributes setObject:mtlAttributeDesc atIndexedSubscript:i]; >+ // FIXME: What is GPUVertexAttributeDescriptor.shaderLocation used for? > } > > // Populate vertex buffer layouts, if any. >@@ -154,6 +157,7 @@ static bool setInputStateForPipelineDescriptor(const char* const functionName, M > mtlLayoutDesc.stepFunction = *mtlStepFunction; > mtlLayoutDesc.stride = inputs[j].stride; > [mtlVertexDescriptor.get().layouts setObject:mtlLayoutDesc atIndexedSubscript:j]; >+ // FIXME: What is GPUVertexInputDescriptor.inputSlot used for? > } > > mtlDescriptor.vertexDescriptor = mtlVertexDescriptor.get(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fb54e06ef6722b0c063e0bef3bbeca099124e05a..d9be2ed69ae1b60dffb6f68878a686eacf5710f0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-01-15 Justin Fan <justin_fan@apple.com> >+ >+ [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer >+ https://bugs.webkit.org/show_bug.cgi?id=193473 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Refactor the vertex shader to use the vertex stage input, rather than buffer resources. >+ >+ * webgpu/vertex-buffer-triangle-strip.html: >+ > 2019-01-15 Chris Dumez <cdumez@apple.com> > > Unreviewed, rolling out r239993, r239995, r239997, and >diff --git a/LayoutTests/webgpu/vertex-buffer-triangle-strip.html b/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >index ae97379f8f7e9325bdb2a4a1800b2f4ab397765c..7c770516bdf19d87881de2508435b51a8ebe6ef3 100644 >--- a/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >+++ b/LayoutTests/webgpu/vertex-buffer-triangle-strip.html >@@ -12,17 +12,24 @@ const shaderCode = ` > > using namespace metal; > >-struct Vertex >+struct VertexIn >+{ >+ float4 position [[attribute(0)]]; >+}; >+ >+struct VertexOut > { > float4 position [[position]]; > }; > >-vertex Vertex vertex_main(const device Vertex* vertex_array [[buffer(0)]], uint vid [[vertex_id]]) >+vertex VertexOut vertex_main(VertexIn vertexIn [[stage_in]]) > { >- return vertex_array[vid]; >+ VertexOut vOut; >+ vOut.position = vertexIn.position; >+ return vOut; > } > >-fragment float4 fragment_main(Vertex vertexIn [[stage_in]]) >+fragment float4 fragment_main(VertexOut v [[stage_in]]) > { > return float4(0.0, 1.0, 0.0, 1.0); > }
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 193473
:
359231
|
359297
|
359336