WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201606
Upload triangles tests for 3D suite in MotionMark
https://bugs.webkit.org/show_bug.cgi?id=201606
Summary
Upload triangles tests for 3D suite in MotionMark
Jon Lee
Reported
2019-09-09 10:39:58 PDT
...
Attachments
Patch
(49.43 KB, patch)
2019-09-09 10:58 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jon Lee
Comment 1
2019-09-09 10:58:33 PDT
Created
attachment 378384
[details]
Patch
Simon Fraser (smfr)
Comment 2
2019-09-09 11:20:10 PDT
Comment on
attachment 378384
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378384&action=review
> Websites/browserbench.org/MotionMark1.1/tests/3d/resources/webgpu.js:66 > +struct VertexOutput { > + float4 position : SV_Position; > + float4 color : attribute(1); > +} > + > +vertex VertexOutput vertexMain(float4 position : attribute(0), > + float4 color : attribute(1), > + constant float[] timeUniform : register(b0, space0), > + constant float[] uniforms : register(b0, space1)) { > + float scale = uniforms[0]; > + float offsetX = uniforms[1]; > + float offsetY = uniforms[2]; > + float scalar = uniforms[3]; > + float scalarOffset = uniforms[4]; > + float time = timeUniform[0]; > + > + float fade = fmod(scalarOffset + time * scalar / 10.0, 1.0); > + if (fade < 0.5) { > + fade = fade * 2.0; > + } else { > + fade = (1.0 - fade) * 2.0; > + } > + float xpos = position.x * scale; > + float ypos = position.y * scale; > + float angle = 3.14159 * 2.0 * fade; > + float xrot = xpos * cos(angle) - ypos * sin(angle); > + float yrot = xpos * sin(angle) + ypos * cos(angle); > + xpos = xrot + offsetX; > + ypos = yrot + offsetY; > + > + VertexOutput out; > + out.position = float4(xpos, ypos, 0.0, 1.0); > + out.color = float4(fade, 1.0 - fade, 0.0, 1.0) + color; > + return out; > +} > + > +fragment float4 fragmentMain(float4 inColor : attribute(1)) : SV_Target 0 { > + return inColor; > +} > +`;
Should be 4-space indent.
> Websites/browserbench.org/MotionMark1.1/tests/3d/resources/webgpu.js:168 > + 0, 0.1, 0, 1, /**/ 1, 0, 0, 1, > + -0.1, -0.1, 0, 1, /**/ 0, 1, 0, 1, > + 0.1, -0.1, 0, 1, /**/ 0, 0, 1, 1,
I would line these up.
> Websites/browserbench.org/MotionMark1.1/tests/3d/triangles-webgl.html:78 > +#ifdef GL_ES > +precision mediump float; > +#endif
That's a thing?
> PerformanceTests/MotionMark/tests/3d/resources/webgpu.js:66 > +vertex VertexOutput vertexMain(float4 position : attribute(0), > + float4 color : attribute(1), > + constant float[] timeUniform : register(b0, space0), > + constant float[] uniforms : register(b0, space1)) { > + float scale = uniforms[0]; > + float offsetX = uniforms[1]; > + float offsetY = uniforms[2]; > + float scalar = uniforms[3]; > + float scalarOffset = uniforms[4]; > + float time = timeUniform[0]; > + > + float fade = fmod(scalarOffset + time * scalar / 10.0, 1.0); > + if (fade < 0.5) { > + fade = fade * 2.0; > + } else { > + fade = (1.0 - fade) * 2.0; > + } > + float xpos = position.x * scale; > + float ypos = position.y * scale; > + float angle = 3.14159 * 2.0 * fade; > + float xrot = xpos * cos(angle) - ypos * sin(angle); > + float yrot = xpos * sin(angle) + ypos * cos(angle); > + xpos = xrot + offsetX; > + ypos = yrot + offsetY; > + > + VertexOutput out; > + out.position = float4(xpos, ypos, 0.0, 1.0); > + out.color = float4(fade, 1.0 - fade, 0.0, 1.0) + color; > + return out; > +} > + > +fragment float4 fragmentMain(float4 inColor : attribute(1)) : SV_Target 0 { > + return inColor; > +} > +`;
Clean up indent
> PerformanceTests/MotionMark/tests/3d/resources/webgpu.js:168 > + 0, 0.1, 0, 1, /**/ 1, 0, 0, 1, > + -0.1, -0.1, 0, 1, /**/ 0, 1, 0, 1, > + 0.1, -0.1, 0, 1, /**/ 0, 0, 1, 1,
Ditto.
Jon Lee
Comment 3
2019-09-09 11:24:35 PDT
(In reply to Simon Fraser (smfr) from
comment #2
) Thanks. I filed b201609 to address those comments.
WebKit Commit Bot
Comment 4
2019-09-09 12:30:56 PDT
Comment on
attachment 378384
[details]
Patch Clearing flags on attachment: 378384 Committed
r249657
: <
https://trac.webkit.org/changeset/249657
>
WebKit Commit Bot
Comment 5
2019-09-09 12:30:58 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2019-09-09 12:31:19 PDT
<
rdar://problem/55193279
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug