Changeset 249657 in webkit


Ignore:
Timestamp:
Sep 9, 2019 12:30:50 PM (5 years ago)
Author:
jonlee@apple.com
Message:

Upload triangles tests for 3D suite in MotionMark
https://bugs.webkit.org/show_bug.cgi?id=201606

Reviewed by Simon Fraser.

PerformanceTests:

  • MotionMark/resources/debug-runner/motionmark.css:
  • MotionMark/resources/debug-runner/tests.js:
  • MotionMark/tests/3d/resources/webgl.js:
  • MotionMark/tests/3d/resources/webgpu.js: Added.
  • MotionMark/tests/3d/triangles-webgl.html: Renamed from Websites/browserbench.org/MotionMark1.1/tests/3d/webgl.html.
  • MotionMark/tests/3d/triangles-webgpu.html: Copied from PerformanceTests/MotionMark/tests/3d/webgl.html.

Websites/browserbench.org:

  • MotionMark1.1/resources/debug-runner/tests.js:
  • MotionMark1.1/tests/3d/resources/webgl.js:
  • MotionMark1.1/tests/3d/resources/webgpu.js: Added.
  • MotionMark1.1/tests/3d/triangles-webgl.html: Copied from PerformanceTests/MotionMark/tests/3d/webgl.html.
  • MotionMark1.1/tests/3d/triangles-webgpu.html: Renamed from PerformanceTests/MotionMark/tests/3d/webgl.html.
Location:
trunk
Files:
2 added
7 edited
2 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r249312 r249657  
     12019-09-09  Jon Lee  <jonlee@apple.com>
     2
     3        Upload triangles tests for 3D suite in MotionMark
     4        https://bugs.webkit.org/show_bug.cgi?id=201606
     5
     6        Reviewed by Simon Fraser.
     7
     8        * MotionMark/resources/debug-runner/motionmark.css:
     9        * MotionMark/resources/debug-runner/tests.js:
     10        * MotionMark/tests/3d/resources/webgl.js:
     11        * MotionMark/tests/3d/resources/webgpu.js: Added.
     12        * MotionMark/tests/3d/triangles-webgl.html: Renamed from Websites/browserbench.org/MotionMark1.1/tests/3d/webgl.html.
     13        * MotionMark/tests/3d/triangles-webgpu.html: Copied from PerformanceTests/MotionMark/tests/3d/webgl.html.
     14
    1152019-08-29  Keith Rollin  <krollin@apple.com>
    216
  • trunk/PerformanceTests/MotionMark/resources/debug-runner/motionmark.css

    r243841 r249657  
    210210    color: hsl(11, 72%, 50%);
    211211    margin-bottom: 1em;
     212    -apple-trailing-word: -apple-partially-balanced;
    212213}
    213214
  • trunk/PerformanceTests/MotionMark/resources/debug-runner/tests.js

    r234832 r249657  
    355355    [
    356356        {
    357             url: "3d/webgl.html",
    358             name: "WebGL"
     357            url: "3d/triangles-webgl.html",
     358            name: "Triangles (WebGL)"
     359        },
     360        {
     361            url: "3d/triangles-webgpu.html",
     362            name: "Triangles (WebGPU)"
    359363        },
    360364    ]
  • trunk/PerformanceTests/MotionMark/tests/3d/resources/webgl.js

    r224388 r249657  
    4242            var gl = this._gl;
    4343
    44             gl.clearColor(0.5, 0.5, 0.5, 1);
     44            gl.clearColor(0, 0, 0, 1);
    4545
    4646            // Create the vertex shader object.
  • trunk/PerformanceTests/MotionMark/tests/3d/triangles-webgl.html

    r249656 r249657  
    11<!--
    2   Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2  Copyright (C) 2015-2019 Apple Inc. All rights reserved.
    33
    44  Redistribution and use in source and binary forms, with or without
     
    2828    <meta charset="utf-8">
    2929    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     30    <style>
     31        #stage {
     32            background-color: #000;
     33        }
     34    </style>
    3035</head>
    3136<body>
  • trunk/PerformanceTests/MotionMark/tests/3d/triangles-webgpu.html

    r249656 r249657  
    11<!--
    2   Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2  Copyright (C) 2019 Apple Inc. All rights reserved.
    33
    44  Redistribution and use in source and binary forms, with or without
     
    2828    <meta charset="utf-8">
    2929    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     30    <style>
     31        #stage {
     32            background-color: #fff;
     33        }
     34    </style>
    3035</head>
    3136<body>
    3237    <canvas id="stage"></canvas>
    33     <script id="vertex" type="x-shader/x-glsl">
    34 attribute vec4 position;
    35 attribute vec4 color;
    36 
    37 uniform float scale;
    38 uniform float time;
    39 uniform float offsetX;
    40 uniform float offsetY;
    41 uniform float scalar;
    42 uniform float scalarOffset;
    43 
    44 varying vec4 v_color;
    45 
    46 void main() {
    47 
    48     float fade = mod(scalarOffset + time * scalar / 10.0, 1.0);
    49 
    50     if (fade < 0.5) {
    51         fade = fade * 2.0;
    52     } else {
    53         fade = (1.0 - fade) * 2.0;
    54     }
    55 
    56     float xpos = position.x * scale;
    57     float ypos = position.y * scale;
    58 
    59     float angle = 3.14159 * 2.0 * fade;
    60     float xrot = xpos * cos(angle) - ypos * sin(angle);
    61     float yrot = xpos * sin(angle) + ypos * cos(angle);
    62 
    63     xpos = xrot + offsetX;
    64     ypos = yrot + offsetY;
    65 
    66     v_color = vec4(fade, 1.0 - fade, 0.0, 1.0) + color;
    67     gl_Position = vec4(xpos, ypos, 0.0, 1.0);
    68 }
    69     </script>
    70     <script id="fragment" type="x-shader/x-glsl">
    71 #ifdef GL_ES
    72 precision mediump float;
    73 #endif
    74 
    75 varying vec4 v_color;
    76 
    77 void main() {
    78     gl_FragColor = v_color;
    79 }
    80     </script>
    8138    <script src="../../resources/strings.js"></script>
    8239    <script src="../../resources/extensions.js"></script>
     
    8441    <script src="../resources/math.js"></script>
    8542    <script src="../resources/main.js"></script>
    86     <script src="resources/webgl.js"></script>
     43    <script src="resources/webgpu.js"></script>
    8744</body>
    8845</html>
  • trunk/Websites/browserbench.org/ChangeLog

    r244357 r249657  
     12019-09-09  Jon Lee  <jonlee@apple.com>
     2
     3        Upload triangles tests for 3D suite in MotionMark
     4        https://bugs.webkit.org/show_bug.cgi?id=201606
     5
     6        Reviewed by Simon Fraser.
     7
     8        * MotionMark1.1/resources/debug-runner/tests.js:
     9        * MotionMark1.1/tests/3d/resources/webgl.js:
     10        * MotionMark1.1/tests/3d/resources/webgpu.js: Added.
     11        * MotionMark1.1/tests/3d/triangles-webgl.html: Copied from PerformanceTests/MotionMark/tests/3d/webgl.html.
     12        * MotionMark1.1/tests/3d/triangles-webgpu.html: Renamed from PerformanceTests/MotionMark/tests/3d/webgl.html.
     13
    1142019-04-16  Jon Lee  <jonlee@apple.com>
    215
  • trunk/Websites/browserbench.org/MotionMark1.1/resources/debug-runner/tests.js

    r234832 r249657  
    355355    [
    356356        {
    357             url: "3d/webgl.html",
    358             name: "WebGL"
     357            url: "3d/triangles-webgl.html",
     358            name: "Triangles (WebGL)"
     359        },
     360        {
     361            url: "3d/triangles-webgpu.html",
     362            name: "Triangles (WebGPU)"
    359363        },
    360364    ]
  • trunk/Websites/browserbench.org/MotionMark1.1/tests/3d/resources/webgl.js

    r224388 r249657  
    4242            var gl = this._gl;
    4343
    44             gl.clearColor(0.5, 0.5, 0.5, 1);
     44            gl.clearColor(0, 0, 0, 1);
    4545
    4646            // Create the vertex shader object.
  • trunk/Websites/browserbench.org/MotionMark1.1/tests/3d/triangles-webgl.html

    r249656 r249657  
    11<!--
    2   Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2  Copyright (C) 2015-2019 Apple Inc. All rights reserved.
    33
    44  Redistribution and use in source and binary forms, with or without
     
    2828    <meta charset="utf-8">
    2929    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     30    <style>
     31        #stage {
     32            background-color: #000;
     33        }
     34    </style>
    3035</head>
    3136<body>
  • trunk/Websites/browserbench.org/MotionMark1.1/tests/3d/triangles-webgpu.html

    r249656 r249657  
    11<!--
    2   Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2  Copyright (C) 2019 Apple Inc. All rights reserved.
    33
    44  Redistribution and use in source and binary forms, with or without
     
    2828    <meta charset="utf-8">
    2929    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     30    <style>
     31        #stage {
     32            background-color: #fff;
     33        }
     34    </style>
    3035</head>
    3136<body>
    3237    <canvas id="stage"></canvas>
    33     <script id="vertex" type="x-shader/x-glsl">
    34 attribute vec4 position;
    35 attribute vec4 color;
    36 
    37 uniform float scale;
    38 uniform float time;
    39 uniform float offsetX;
    40 uniform float offsetY;
    41 uniform float scalar;
    42 uniform float scalarOffset;
    43 
    44 varying vec4 v_color;
    45 
    46 void main() {
    47 
    48     float fade = mod(scalarOffset + time * scalar / 10.0, 1.0);
    49 
    50     if (fade < 0.5) {
    51         fade = fade * 2.0;
    52     } else {
    53         fade = (1.0 - fade) * 2.0;
    54     }
    55 
    56     float xpos = position.x * scale;
    57     float ypos = position.y * scale;
    58 
    59     float angle = 3.14159 * 2.0 * fade;
    60     float xrot = xpos * cos(angle) - ypos * sin(angle);
    61     float yrot = xpos * sin(angle) + ypos * cos(angle);
    62 
    63     xpos = xrot + offsetX;
    64     ypos = yrot + offsetY;
    65 
    66     v_color = vec4(fade, 1.0 - fade, 0.0, 1.0) + color;
    67     gl_Position = vec4(xpos, ypos, 0.0, 1.0);
    68 }
    69     </script>
    70     <script id="fragment" type="x-shader/x-glsl">
    71 #ifdef GL_ES
    72 precision mediump float;
    73 #endif
    74 
    75 varying vec4 v_color;
    76 
    77 void main() {
    78     gl_FragColor = v_color;
    79 }
    80     </script>
    8138    <script src="../../resources/strings.js"></script>
    8239    <script src="../../resources/extensions.js"></script>
     
    8441    <script src="../resources/math.js"></script>
    8542    <script src="../resources/main.js"></script>
    86     <script src="resources/webgl.js"></script>
     43    <script src="resources/webgpu.js"></script>
    8744</body>
    8845</html>
Note: See TracChangeset for help on using the changeset viewer.